Closed GoogleCodeExporter closed 9 years ago
XMLHttpRequest works just fine with HandleBeforeResourceLoad -- all of the
request information is stored in the |request| parameter. You don't need to
return an HTTP status code. Setting the |resourceStream| and |mimeType|
parameters and returning RV_CONTINUE explicitly indicates success in handling
the request. Returning RV_HANDLED cancels the request.
Original comment by magreenb...@gmail.com
on 11 Jan 2011 at 5:11
Request it is request, but response is absent.
I return response body and mime type correctly.
Then JS code got my full response body in XHR.
So we have follow:
XHR.responseText contains stream returned by HandleBeforeResourceLoad.
XHR.status=0 - it is HTTP status, zero means error in XMLHttpRequest.
XHR.statusText="" - empty string also signal error.
Original comment by fdd...@gmail.com
on 12 Jan 2011 at 5:57
Uff.
Sorry this issue a completely not a bug.
XHR works fine with HandleBeforeResourceLoad. (But many XHR wrappers as jquery
listen only onreadystatechange and check status, but for chrome will be better
to listen onload event...).
Thanks for you help, and great project!
Original comment by fdd...@gmail.com
on 14 Jan 2011 at 2:02
Definetely a bug: the XHR object has status & statusText fields, which js
libraries rely on.
At the very least a valid status value should be placed in status, and 0 isn't
a valid status value, if success is assumed, then the value should be set to
200 to be compatible with js libraries and frameworks.
Original comment by zar...@gmail.com
on 30 Mar 2011 at 12:20
Original comment by magreenb...@gmail.com
on 30 Mar 2011 at 1:13
Original issue reported on code.google.com by
fdd...@gmail.com
on 11 Jan 2011 at 8:00