WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 24572
29304
XMLHTTPRequest responses do not include the correct statusText
https://bugs.webkit.org/show_bug.cgi?id=29304
Summary
XMLHTTPRequest responses do not include the correct statusText
Jan Lehnardt
Reported
2009-09-16 10:38:03 PDT
Any XHR response has the property `statusText` hardcoded to "OK", instead of the correct string corresponding to the response's `statusCode` property. This breaks RFC2616. The attached patch fixes this on the Mac platform. The correct fix would be adding a `responseText` method to NSHTTPURLResponse, but this is out of my reach. I filed radr://7227480, though. The formatting of the case statement is deliberately diverging from the coding standards for readability. I hope you agree with my choice. If not, I'm happy to make a coding standards compliant version. I added a simple test case for this patch and fixed another test case that relied on the broken behaviour. Please let me know if you need any more information.
Attachments
implements the described issue.
(7.57 KB, patch)
2009-09-16 12:25 PDT
,
Jan Lehnardt
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jan Lehnardt
Comment 1
2009-09-16 12:25:28 PDT
Created
attachment 39654
[details]
implements the described issue.
Alexey Proskuryakov
Comment 2
2009-09-18 08:49:51 PDT
I don't think it's helpful to fake response status text - the one case when web apps need to know it is when it's non-default, and this patch makes it more difficult to detect the broken WebKit behavior. *** This bug has been marked as a duplicate of
bug 24572
***
Jan Lehnardt
Comment 3
2009-09-18 09:42:04 PDT
Sorry for filing a duplicate. My search for "responseText" didn't show #24572 (
https://bugs.webkit.org/buglist.cgi?quicksearch=responseText
). I don't think I understand Alexey's reasoning. This is a bug that makes WebKit behave non RFC conform and I don't see a good reason to not fix it except "too many people depend on it". I understand that the open web is not the only target for WebKit users and that in some environments WebKit is the only engine to program against, but I believe the majority of users could do with the correct behaviour. Especially when it is only "wrong" on the Mac platform. I also don't think this is "faking" response codes, it is just adding the correct ones.
Alexey Proskuryakov
Comment 4
2009-09-18 10:06:17 PDT
This is definitely a bug that should be fixed, but we need support from NSHTTPURLResponse to do that. There is no such thing as "correct" status text - the server may well respond with "HTTP/1.1 500 Please reboot me", for example.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug