chunked Transfer-Encoding forbidden: /cgi-bin/echo.pl

chunked Transfer-Encoding forbidden: /cgi-bin/echo.pl

Post by Tom Amir » Thu, 23 Sep 1999 04:00:00



I'm getting the subject error in my log on attempts to POST data
with Transfer-Encoding: chunked set, to /cgi-bin/echo.pl. The
server is responding with:

   HTTP/1.1 411 Length Required
   Date: Wed, 22 Sep 1999 19:09:38 GMT
   Server: Apache/1.3.6 (Unix)
   Connection: close
   Content-Type: text/html

In HTTP/1.1, as far as I know, chunking is on by default.
An Apache Week article on HTTP 1.1 even
says that using chunking  is a way around the problem of not knowing
content-length with dynamic  CGI output.

I haven't configured anything to turn off chunking with /cgi-bin scripts.
So I don't know what's going on.

Here's an example of a test that is running into this problem.

   ## ka13 -- chunked
   POST http://localhost/cgi-bin/echo.pl HTTP/1.1
    Host: localhost
    Transfer-encoding: chunked

    0001c
    The twenty-eight characters

    0

    GET http://localhost/small.html HTTP/1.1
    Host: localhost
    Connection: close

The reason I have a feeling this shouldn't be happening
is that the same test works with a different web server,
Sun Web Server.

Any suggestions for configuring Apache to enable chunked
transfers via a cgi-bin scrip will be greatly appreciated.

Tom