Closed
Bug 561042
Opened 11 years ago
Closed 10 years ago
cannot load page send too large cookie
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: arno, Assigned: arno)
References
()
Details
(Whiteboard: [inbound])
Attachments
(3 files)
Hi, when a page tries to set a big cookie, page does not load. Gecko does not even display about:blank, it just stays on current page. If i copy this url in firefox urlbar and open a new tab with Alt-Enter, all I get is a blank tab with grey background. http://localhost/tmp/cookie.php source: http://localhost/tmp/cookie.txt
Assignee | ||
Updated•11 years ago
|
Comment 1•11 years ago
|
||
Can you attach the files here?
Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Sending an HTTP header that large will bust the limit on either the webserver, or the client (Firefox), and result in the connection being dropped. Hence the pageload fail. This isn't a bug on our side; if anything, you should file a bug with the PHP folks to throw an error if you try to set a cookie larger than 4KB, and maybe if the total HTTP header size exceeds the limit. (I'm not sure exactly what that limit is; it varies between browsers and probably servers too.)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to comment #3) > Sending an HTTP header that large will bust the limit on either the webserver, > or the client (Firefox), It's probably Firefox: other browsers handle this page well. > and result in the connection being dropped. Hence the > pageload fail. Ok. But may be it's better to load aubout:neterror when firefox drop connection instead of letting a grey background. > This isn't a bug on our side; if anything, you should file a bug with the PHP > folks to throw an error if you try to set a cookie larger than 4KB, and maybe > if the total HTTP header size exceeds the limit. (I'm not sure exactly what > that limit is; it varies between browsers and probably servers too.) Even if php modifies his behaviour. I can still send those headers with python, C, whatever. That won't prevent users from having this
Assignee | ||
Comment 5•11 years ago
|
||
> http://localhost/tmp/cookie.php > source: > http://localhost/tmp/cookie.txt Oopps, sorry for that. Real links were: http://renevier.net/bugs/bigcookie.txt http://renevier.net/bugs/bigcookie.php
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to comment #3) > Sending an HTTP header that large will bust the limit on either the webserver, > or the client (Firefox), It's probably Firefox: other browsers handle this page well. > and result in the connection being dropped. Hence the > pageload fail. Ok. But may be it's better to load about:neterror when firefox drop connection instead of doing nothing. > This isn't a bug on our side; if anything, you should file a bug with the PHP > folks to throw an error if you try to set a cookie larger than 4KB, and maybe > if the total HTTP header size exceeds the limit. (I'm not sure exactly what > that limit is; it varies between browsers and probably servers too.) Even if php modifies his behaviour. I can still send those headers with python, C, whatever.
Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Other browsers don't die, you say? Worth another look, then.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
![]() |
||
Comment 9•11 years ago
|
||
nsHttpTransaction::ParseLineSegment has: 721 if (mLineBuf.Length() + len > MAX_LINEBUF_LENGTH) { 722 LOG(("excessively long header received, canceling transaction [trans=%x]", this)); 723 return NS_ERROR_ABORT; 724 } MAX_LINEBUF_LENGTH is (1024 * 10). That code was added in bug 152697. I suppose we could do an about:neterror here by using a status code nsDocShell::EndLoad recognizes or adding NS_ERROR_ABORT there, or using a new code just for this case. We could also increase (or remove?) the limit here.
Comment 10•11 years ago
|
||
Sounds like a sensible thing to do, especially since a single cookie can be 4K. :)
Component: Networking: Cookies → Networking: HTTP
QA Contact: networking.cookies → networking.http
![]() |
||
Comment 11•11 years ago
|
||
Which one does? I just checked and chrome has no obvious header length limit, btw.
Comment 12•11 years ago
|
||
Either making it much bigger or removing it. Having such a small limit to prevent DOS isn't such a strong argument nowadays, I think. Ideally we'd also have a neterror page, but that can be a separate bug...
![]() |
||
Comment 13•11 years ago
|
||
My gut feel is to nix the check. Jason, thoughts?
Comment 14•11 years ago
|
||
Sure, my gut feel is fine with nixing the check. So long as we also make sure nothing breaks as a result :)
Assignee | ||
Comment 15•10 years ago
|
||
patch proposal: remove http header length check.
Attachment #546303 -
Flags: review?(bzbarsky)
![]() |
||
Comment 16•10 years ago
|
||
Comment on attachment 546303 [details] [diff] [review] patch proposal r=me
Attachment #546303 -
Flags: review?(bzbarsky) → review+
![]() |
||
Updated•10 years ago
|
Assignee: nobody → arno
Keywords: checkin-needed
Updated•10 years ago
|
Comment 17•10 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9c8b0c5a5591
Status: REOPENED → RESOLVED
Closed: 11 years ago → 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•