[Catalyst-dev] HTTP engine closing socket on header failure
Andy Grundman
andy at hybridized.org
Fri Apr 4 17:08:13 BST 2008
On Apr 3, 2008, at 5:49 PM, Ton Voon wrote:
> Hi!
>
> We hit a problem with the HTTP development engine where a connection
> would come in without any headers and the remote socket wasn't being
> closed correctly.
>
> This patch to Catalyst::Engine::HTTP closes the Remote connection
> and also prints debug statements around the sysread.
Thanks. You're right that STDIN is set to non-blocking before
_read_headers is called the second time, so it needs to support non-
blocking mode.
Your patch looks sane, I've committed a slightly modified version. A
test case would be nice but I realize it's a bit hard in this case. I
tested manually and saw the connection bug with the old code, and the
patch definitely fixes it.
-Andy
More information about the Catalyst-dev
mailing list