Closed
Bug 137153
Opened 24 years ago
Closed 24 years ago
POST requests sent without message body
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jwbaker, Assigned: john)
Details
(Keywords: testcase)
Attachments
(1 file)
|
302 bytes,
text/html
|
Details |
(this may be net:http or html forms, i picked the former)
Mozilla 0.9.9 on Linux can sometimes send bogus HTTP POST requests. A form with
no named inputs will cause a POST request to be sent with no content length and
no message body.
<form method="post"><input type="submit"></form>
will cause this HTTP request to be sent:
POST /something.html HTTP/1.1
Host: jwb.gghcwest.com
User-Agent: Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020402
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Referer: http://jwb.gghcwest.com/something.html
Content-Type: application/x-www-form-urlencoded
That's it: no message body and no content length header. This seems to violate
RFC 2616 section 4.4 "If a request contains a message-body and Content-Length is
not given, the server SHOULD respond with 400 (bad request)..." Indeed this
what the server responds with.
I discovered this problem because a site had a "License Agreement" form with
only an unnamed submit button:
http://www.ahpah.com/cgi-bin/suid/~pah/demo_license.cgi
| Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
-> jkeiser (necko just posts whatever data form submission gives it)
Assignee: darin → jkeiser
Component: Networking: HTTP → Form Submission
| Reporter | ||
Comment 3•24 years ago
|
||
I agree that an empty POST request is stoopid, but adding Content-Length: 0
would at least bring the HTTP side into RFC goodness.
| Assignee | ||
Comment 4•24 years ago
|
||
Strange, I would have thought this fixed by bug 129333.
| Reporter | ||
Comment 5•24 years ago
|
||
Ah, it probably was checked in on the trunk and not the 0.9.9 branch. I am
unable to test nightlies, but if someone else gives the testcase a spin they
could verify.
Comment 6•24 years ago
|
||
WFM with current trunk as per jkeiser and jeff baker's comments; probably was
never checked into 0.9.9 branch.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•