Bug 49767 - No last-chunk '0' after POST request on CGI script
Summary: No last-chunk '0' after POST request on CGI script
Status: RESOLVED DUPLICATE of bug 49766
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cgid (show other bugs)
Version: 2.2.14
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2010-08-17 13:17 UTC by Reginald LIPS
Modified: 2010-08-18 06:29 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Reginald LIPS 2010-08-17 13:17:37 UTC
After a fresh install of Apache2 (2.2.14), I wrote a small CGI script:

~# cat /usr/lib/cgi-bin/test

print "Content-type: text/plain\r\n\r\n";
print "foo";

Then, ran a small test (for a small script :):

~$ telnet 0 80
Connected to 0.
Escape character is '^]'.
POST /cgi-bin/test HTTP/1.1
Host: localhost
Content-Length: 20

HTTP/1.1 200 OK
Date: Tue, 17 Aug 2010 17:12:01 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/plain

Connection closed by foreign host.

As we can see, I can't get the last-chunk '0\r\n\r\n' at the end of the HTTP response. It just ends up in a timeout...
Comment 1 Ruediger Pluem 2010-08-18 02:12:32 UTC
I assume if you are just doing a GET things work fine, correct?
Your CGI script is no capable of handling POST requests as it does not read the request body prior to sending an answer.
Comment 2 Dan Poirier 2010-08-18 06:29:24 UTC

*** This bug has been marked as a duplicate of bug 49766 ***