Closed
Bug 82873
Opened 23 years ago
Closed 23 years ago
HTTP trailers not supported
Categories
(Core :: Networking: HTTP, defect, P5)
Core
Networking: HTTP
Tracking
()
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: c, Assigned: darin.moz)
References
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
gagan
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
Trailers in responses with "Transfer-Encoding: chunked" are treated as chunks
(if their name begins with [A-F]) or lead to an error (otherwise).
Note that some trailers are allowed in HTTP/1.1 even if we don't send
"TE: trailers".
I'll attach a patch, but it is probably not complete. It does not add support
for the "Trailer" header and I do not know if problems are caused by adding
headers after the page itself has arrived.
While writing the patch I noticed a related problem with
nsHttpTransaction::Read(): I am not sure, but I think we loose data if
pipelining is enabled and data of different responses is contained within a
single chunk arriving over the network.
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
lack of support for trailers is a regression from the http branch landing.
pipelining is currently not implemented, but that being said the problem you
have described will need to be solved once pipelining is activated. my approach
to that problem is simply to have a PushBack method on nsHttpConnection, so
data can be in a sense given back to the connection (and later given out to the
next transaction in the pipeline). so, in short, this "bug" is really just a
prerequisit for pipelining in the new world.
Keywords: regression
Target Milestone: --- → mozilla0.9.2
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
clarence: i'm not completely sold on the design put forth by your patch. i
think the changes could be more isolated to either just the chunked decoder
or just the http transaction code. in the old code, we let the chunked decoder
eat the trailing headers and only report EOF after they had been consumed. this
is probably the right thing now as well, but for some time i have considered
doing it in nsHttpTransaction (in much the same manner as regular headers are
parsed). this may just add clutter to nsHttpTransaction, so for that reason
i'm leaning toward the former solution.
at any rate, i've gone ahead and attached a very simple work around for this bug
just in case.
Assignee | ||
Updated•23 years ago
|
Priority: -- → P2
I am assuming you made the DontReuse function so you could call it from
elsewhere as well (in future) r=gagan
Comment 6•23 years ago
|
||
how hard would be it to consume the last bytes on the socket. Note that ftp is
going to want something that takes a nsSocketTransport and consumes any extra
data on the socket.
If it is too hard to do now, that is fine. (s)r=d
Assignee | ||
Comment 7•23 years ago
|
||
yeah.. i just didn't want to slap something together, and trailers are a VERY
rare occurance. until getting the right patch, i just wanted to land something
to make us at least not fail to load the next page.
Comment 8•23 years ago
|
||
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Assignee | ||
Comment 9•23 years ago
|
||
minimal patch checked in... futuring this bug.
Priority: P2 → P5
Target Milestone: mozilla0.9.2 → Future
Assignee | ||
Comment 10•23 years ago
|
||
-> moz 0.9.5 since this will need to be fixed before the pipelining code can land.
Target Milestone: Future → mozilla0.9.5
Assignee | ||
Comment 11•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #36256 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #37140 -
Attachment is obsolete: true
Assignee | ||
Comment 12•23 years ago
|
||
Comment on attachment 50655 [details] [diff] [review]
v1.0 patch
>+ else {
>+ // save the partial line; wait for more data
>+ mLineBuf.Append(buf, count);
>+ *bytesConsumed = count;
>+ }
this is no good... it actually needs to skip a trailing CR.
Attachment #50655 -
Attachment is obsolete: true
Assignee | ||
Comment 13•23 years ago
|
||
Attachment #50656 -
Flags: review+
Comment 14•23 years ago
|
||
Comment on attachment 50656 [details] [diff] [review]
v1.1 revised to better handled CRLF line delimiters
r=gagan
Comment 15•23 years ago
|
||
Comment on attachment 50656 [details] [diff] [review]
v1.1 revised to better handled CRLF line delimiters
sr=mscott
Attachment #50656 -
Flags: superreview+
Assignee | ||
Comment 16•23 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 17•22 years ago
|
||
Verified per darin's comment.
Status: RESOLVED → VERIFIED
QA Contact: benc → junruh
You need to log in
before you can comment on or make changes to this bug.
Description
•