[Catalyst] "Wrong Content-Length value"
catalyst at bionikchickens.com
Wed Sep 8 23:13:15 GMT 2010
okay - in this context I can understand your original message. I think
catalyst is behaving okay. In your example, the client is disconnected so it
cannot receive a response code. in my test telnet where I ran your example,
I fed more data in than was expected - but since I left the client connected
I got a response. the server went ahead and detected the content-length and
failed gracefully, though cryptically...
POST /foo HTTP/1.1
HTTP/1.0 404 Not Found
Date: Wed, 08 Sep 2010 23:09:47 GMT
Content-Type: text/html; charset=3Dutf-8
Page not found
On Wed, Sep 8, 2010 at 3:16 PM, Bill Moseley <moseley at hank.org> wrote:
> On Wed, Sep 8, 2010 at 2:38 PM, Nicholas Wehr <catalyst at bionikchickens.com
> > wrote:
>> interesting problem. so the client is making byte-range requests on
>> dynamic content? if it's static - I'd recommend you defer this functiona=
>> to apache.
> No, it's not that. It's simply that the client is sending a content-leng=
> header and after Catalyst / HTTP::Body slurps in the body Catalyst does a
> sanity check to see if the length of the body really was the length
> specified in the header.
> moseley at bumby2:~$ catalyst.pl Length
> moseley at bumby2:~$ CATALYST_DEBUG=3D0 Length/script/length_server.pl
> You can connect to your server at http://bumby2:3000
> moseley at bumby2:~$ telnet localhost 3000
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> POST /foo HTTP/1.1
> Host: localhost:3000
> Content-Type: application/octet-stream
> Content-Length: 400000
> just some stuff
> telnet> quit
> Connection closed.
> Results in:
> [error] Caught exception in engine "Wrong Content-Length value: 400000"
> Bill Moseley
> moseley at hank.org
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst