[webkit-changes] cvs commit: WebCore/khtml/ecma xmlhttprequest.cpp
Alexey
ap at opensource.apple.com
Fri Dec 23 00:55:02 PST 2005
ap 05/12/23 00:55:02
Modified: . ChangeLog
khtml/ecma xmlhttprequest.cpp
Log:
Reviewed by Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5924
Zero-length responses to XMLHTTPRequest mishandled
* khtml/ecma/xmlhttprequest.cpp (KJS::XMLHttpRequest::slotFinished):
Make sure to fetch response headers and set the state to Loaded, if
this hasn't been done already.
Revision Changes Path
1.34 +1 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ChangeLog 23 Dec 2005 08:50:13 -0000 1.33
+++ ChangeLog 23 Dec 2005 08:55:01 -0000 1.34
@@ -1,3 +1,4 @@
+2005-12-23 Alexey Proskuryakov <ap at nypop.com>
Reviewed by Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5924
Zero-length responses to XMLHTTPRequest mishandled
* khtml/ecma/xmlhttprequest.cpp (KJS::XMLHttpRequest::slotFinished):
Make sure to fetch response headers and set the state to Loaded, if
this hasn't been done already.
2005-12-23 Alexey Proskuryakov <ap at nypop.com>
Reviewed by Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3565
Posting data via XML HTTP Request doesnt work
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::send): Set application/xml as a default Content-Type;
use a proper codec for request body if a charset is specified.
(KJS::XMLHttpRequest::getRequestHeader): Use getSpecificHeader.
(KJS::XMLHttpRequest::getResponseHeader): Ditto.
(KJS::XMLHttpRequest::getSpecificHeader): Factored out code from getResponseHeader.
(KJS::XMLHttpRequestProtoFunc::callAsFunction): Removed a FIXME (this is done in send() now).
* khtml/ecma/xmlhttprequest.h:
2005-12-22 Alexey Proskuryakov <ap at nypop.com>
1.57 +6 -0 WebCore/khtml/ecma/xmlhttprequest.cpp
Index: xmlhttprequest.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/xmlhttprequest.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- xmlhttprequest.cpp 23 Dec 2005 08:50:13 -0000 1.56
+++ xmlhttprequest.cpp 23 Dec 2005 08:55:02 -0000 1.57
@@ -576,6 +576,12 @@
void XMLHttpRequest::slotFinished(KIO::Job *)
{
+ if (responseHeaders.isEmpty() && job)
+ responseHeaders = job->queryMetaData("HTTP-Headers");
+
+ if (state < Loaded)
+ changeState(Loaded);
+
if (decoder)
response += decoder->flush();
More information about the webkit-changes
mailing list