Firebug is using (nsIUploadChannel) request.uploadStream to read data
posted with an HTTP request.
The problem appears if you load following page:
http://getfirebug.com/tests/issues/4327/
Check the action.php requests. 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
Any ideas where the additional header came from?
Note that Flash is used to post that data.
Honza
What are you looking at in Wireshark? The full HTTP request? Or just
the request body?
> Note that Flash is used to post that data.
In which case some of the headers will be in the upload stream, yes.
-Boris
Honza
OK, that's correct. The stream on upload channels can contain headers,
not just body data, as you saw.
-Boris
Is there any way how to safely clear away these headers so, Firebug
shows the same
request body as WireShark?
Honza
The upload stream is appended to the HTTP request once the part Firefox
plans to put in is done. If the HTTP request's headers are not done at
that point (which is controlled by how SetUploadStream was called), the
upload stream can add headers.
> Is there any way how to safely clear away these headers so, Firebug
> shows the same
> request body as WireShark?
As things stand, looks like no. You'd need to check the value of
mUploadStreamHasHeaders on the HttpBaseChannel, and that's not exposed
anywhere I can see.
File a bug to expose it?
-Boris