Closed
Bug 649338
Opened 13 years ago
Closed 13 years ago
Expose mUploadStreamHasHeaders on the HttpBaseChannel to allow removing appended headers to nsIUploadChannel
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
Tracking | Status | |
---|---|---|
firefox7 | --- | fixed |
People
(Reporter: Honza, Assigned: mayhemer)
Details
(Whiteboard: [firebug-p2][qa-])
Attachments
(1 file)
2.28 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
This bug has been originally created for Firebug here: http://code.google.com/p/fbug/issues/detail?id=4327 Firebug is using (nsIUploadChannel) request.uploadStream to read data posted with an HTTP request. STR: The problem appears if you load following page: http://getfirebug.com/tests/issues/4327/ Check the action.php requests (note that Flash is used to post that data). When Firebug reads posted data from the upload channel it looks as follows: Content-type: application/x-www-form-urlencoded Content-length: 26 data=%7Bfoo%3A%27foo%27%7D But WireShark shows only: data=%7Bfoo%3A%27foo%27%7D === There is no way how to safely clear away these headers so, Firebug shows the same as Wireshark. Boris is proposing: Firebug could check the value of mUploadStreamHasHeaders on the HttpBaseChannel, but it's not exposed anywhere. You can also read related discussion: http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/1faabb0d0a8d26f7?hl=en# Honza
Reporter | ||
Updated•13 years ago
|
Whiteboard: [firebug-p2]
Comment 1•13 years ago
|
||
Honza (mayhemer), does that make sense? Want to write a patch?
Version: 1.9.1 Branch → Trunk
Assignee | ||
Comment 2•13 years ago
|
||
Yes, it perfectly makes sense for me. It is a very simple solution.
Comment 3•13 years ago
|
||
What about the second question? ;)
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to comment #3) > What about the second question? ;) I can do that :)
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Reporter | ||
Comment 5•13 years ago
|
||
Can we target Firefox 6? What flag should I set (if any)? Honza
Comment 6•13 years ago
|
||
There is no flag. If it gets done in time, it gets in. If if doesn't, it doesn't.
Assignee | ||
Comment 7•13 years ago
|
||
My plan is to put readonly attribute bool uploadStreamHasHeaders to one of nsIUploadChannel or nsIUploadChannel2 or (and it is the question) new nsIUploadChannel3 interface. What is a desired option? I believe Honza prefers to modify nsIUploadChannel2. Me probably too.
Reporter | ||
Comment 8•13 years ago
|
||
(In reply to comment #7) > I believe Honza prefers to modify nsIUploadChannel2 Yes Honza
Assignee | ||
Comment 9•13 years ago
|
||
Attachment #532691 -
Flags: review?(bzbarsky)
Comment 10•13 years ago
|
||
Comment on attachment 532691 [details] [diff] [review] v1 [Check in comment 11] Please use "boolean" in the IDL, not PRBool. r=me with that.
Attachment #532691 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 11•13 years ago
|
||
Comment on attachment 532691 [details] [diff] [review] v1 [Check in comment 11] http://hg.mozilla.org/mozilla-central/rev/a54c69c20b6c http://hg.mozilla.org/mozilla-central/rev/9ad384bc560c (comment fix)
Attachment #532691 -
Attachment description: v1 → v1 [Check in comment 11]
Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
status-firefox7:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Comment 12•13 years ago
|
||
Hello. Could anyone provide some simple STRs for verifying this issue?
Comment 13•13 years ago
|
||
If firebug now uses this feature, I'd consider that verification enough.
Reporter | ||
Comment 14•13 years ago
|
||
I can see that a new attribute: nsIUploadChannel2.uploadStreamHasHeaders has been created. So, how am I suppose to clear the headers so, Firebug shows the same post-data as Wireshark? (see comment #0) Honza
Comment 15•13 years ago
|
||
You read from the stream until you get to a CRLF CRLF. Everything before then is headers. Everything after that is data. Basically, when uploadStreamHasHeaders the stream contains the end of the HTTP request headers and the blank line and then the request body.
Reporter | ||
Comment 16•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #15) > You read from the stream until you get to a CRLF CRLF. Everything before > then is headers. Everything after that is data. Basically, when > uploadStreamHasHeaders the stream contains the end of the HTTP request > headers and the blank line and then the request body. Thanks Boris! Honza
Comment 17•13 years ago
|
||
qa-: fix verification unnecessary
Whiteboard: [firebug-p2] → [firebug-p2][qa-]
Reporter | ||
Comment 18•13 years ago
|
||
Note that the original Firebug bug http://code.google.com/p/fbug/issues/detail?id=4327 is fixed and verified by the reporter. Honza
You need to log in
before you can comment on or make changes to this bug.
Description
•