Closed
Bug 726434
Opened 12 years ago
Closed 12 years ago
Return DOMString for XMLHttpRequest.getAllResponseHeaders()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: Ms2ger, Assigned: Ms2ger)
Details
Attachments
(1 file)
4.67 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
There is no point in doing silly things like ToNewCString(EmptyString()), and we'll probably want this for the DOM bindings work in bug 580070.
Attachment #596476 -
Flags: review?(bent.mozilla)
Comment on attachment 596476 [details] [diff] [review] Patch v1 I think this should be ok, but we need to return a void string rather than an empty string to make sure we don't break pages (they could currently test for null, who knows).
Assignee | ||
Comment 2•12 years ago
|
||
You saw - if (!*_retval) { - *_retval = ToNewCString(EmptyString()); - } right?
Comment on attachment 596476 [details] [diff] [review] Patch v1 Review of attachment 596476 [details] [diff] [review]: ----------------------------------------------------------------- Ah, I didn't look very closely before. This seems good. ::: content/base/public/nsIXMLHttpRequest.idl @@ +187,2 @@ > */ > + DOMString getAllResponseHeaders(); Needs an iid bump ::: content/base/src/nsXMLHttpRequest.cpp @@ +1320,5 @@ > } > + > + nsRefPtr<nsHeaderVisitor> visitor = new nsHeaderVisitor(); > + nsresult rv = httpChannel->VisitResponseHeaders(visitor); > + NS_ENSURE_SUCCESS(rv, NS_OK); This is weird (and will warn when it didn't before... unclear if that's good or bad). How about: if (NS_SUCCEEDED(httpChannel->VisitResponseHeaders(visitor))) { aResponseHeaders = NS_ConvertUTF8toUTF16(visitor->Headers()); }
Attachment #596476 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Will do.
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/be00940ec645
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Updated•11 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•