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 Host: localhost:3000 Content-Type: application/octet-stream Content-Length: 4 asdfgasdfasdf HTTP/1.0 404 Not Found Connection: close Date: Wed, 08 Sep 2010 23:09:47 GMT Content-Length: 14 Content-Type: text/html; charset=utf-8 Status: 404 X-Catalyst: 5.80024 Page not found On Wed, Sep 8, 2010 at 3:16 PM, Bill Moseley <[email protected]> wrote: > > > On Wed, Sep 8, 2010 at 2:38 PM, Nicholas Wehr <[email protected] > > wrote: > >> interesting problem. so the client is making byte-range requests on >> dynamic content? if it's static - I'd recommend you defer this functionality >> to apache. >> > > No, it's not that. It's simply that the client is sending a content-length > 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. > > Watch: > > mose...@bumby2:~$ catalyst.pl Length > mose...@bumby2:~$ CATALYST_DEBUG=0 Length/script/length_server.pl > You can connect to your server at http://bumby2:3000 > > > mose...@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 > [email protected] > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > >
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
