[Webkit-unassigned] [Bug 3810] Less common HTTP status codes cause the code to appear as undefined

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 26 04:00:58 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=3810


djt at mutablelogic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djt at mutablelogic.com




------- Comment #11 from djt at mutablelogic.com  2007-10-26 04:00 PDT -------

I'm receiving an exception (INVALID_STATE_ERR: DOM Exception 11) when I try to
access the XMLHttpRequest.status method on 303 responses where there is a
Location: header returned. I have tried PUT and POST methods. Here is my code:

var theRequest = new XMLHttpRequest();
var theContent = [an xml document as a string];
var theURI = [the URI of the web service endpoint];
try {
  theRequest.open("POST",theURI);
  theRequest.setRequestHeader('Content-Type', 'text/xml');
  theRequest.setRequestHeader('X-HTTP-Method-Override', 'PUT');
  theRequest.send(theContent);
  if(theRequest.status == 204 || theRequest.status == 303 || theRequest.status
== 200) {
    return theRequest.responseText;        
  }
} catch(theException) {
  alert("Exception caught, " + theException);                           
}

I'm using Safari Version 3.0.3 (522.12.1) on OS X Tiger 10.4.10. I believe for
AJAX purposes 303 responses should be handled correctly when there is a
Location: header returned, at the moment the exception is not very useful.
Thanks.

David Thorpe djt at mutablelogic.com


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list