Last Comment Bug 730925 - XHR.getAllResponseHeaders should use CRLF, not LF per spec
: XHR.getAllResponseHeaders should use CRLF, not LF per spec
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Mark Capella [:capella]
: Andrew Overholt [:overholt]
Depends on: 778213
Blocks: 726433
  Show dependency treegraph
Reported: 2012-02-27 12:12 PST by :Ms2ger (⌚ UTC+1/+2)
Modified: 2015-10-18 10:58 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (v1) (2.97 KB, patch)
2012-07-24 01:28 PDT, Mark Capella [:capella]
jst: review+
jonas: review+
Ms2ger: feedback+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-02-27 12:12:10 PST
We seem to separate headers with just LFs. (Both in nsHeaderVisitor::VisitHeader and nsXMLHttpRequest::GetAllResponseHeaders)
Comment 1 Mark Capella [:capella] 2012-07-24 01:28:50 PDT
Created attachment 645225 [details] [diff] [review]
Patch (v1)

Original TRY version of the patch didn't contain change to mochitest: content/base/test/test_XHR.html

Controlled TRY test of current version with corrected regex:
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-07-24 03:07:48 PDT
Comment on attachment 645225 [details] [diff] [review]
Patch (v1)

Review of attachment 645225 [details] [diff] [review]:

I guess this is fine, but I don't understand the regex at all :)

Can you verify we pass <> with this patch?
Comment 3 Mark Capella [:capella] 2012-07-24 04:06:31 PDT
Regex is new to me also, I learn just enough to make required patches.

For the linked test, without patch we get:
assert_true: Headers should include a CRLF pair. expected true got false

with the patch it still fails, but now for a different reason / later test:
assert_true: Headers should include the custom header. expected true got false
Comment 4 Mark Capella [:capella] 2012-07-24 07:55:13 PDT
Nice. With your changes, and this patch, the test page "custom header" error went away:
Pass	XMLHttpRequest: getAllResponseHeaders() excludes cookies
Comment 5 Mark Capella [:capella] 2012-07-24 08:07:02 PDT
Comment on attachment 645225 [details] [diff] [review]
Patch (v1)

Review request from Module Owner...
Comment 6 Johnny Stenback (:jst, 2012-07-24 10:01:02 PDT
Comment on attachment 645225 [details] [diff] [review]
Patch (v1)

r=jst assuming Jonas agrees with the spec here. Jonas, any reason not to take this change?
Comment 7 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-07-25 14:01:52 PDT
Comment on attachment 645225 [details] [diff] [review]
Patch (v1)

As long as this is the behavior defined by spec
Comment 8 Mark Capella [:capella] 2012-07-26 08:54:22 PDT
Push to TRY:
Comment 9 Mark Capella [:capella] 2012-07-26 13:32:03 PDT
On to Inbound:
Comment 10 Matt Brubeck (:mbrubeck) 2012-07-26 14:07:21 PDT
Comment 11 Saurabh Nair [:jsx] (not reading all bugmail. ni? if you need me) 2015-10-18 10:58:43 PDT
XHR doc updated -

Note You need to log in before you can comment on or make changes to this bug.