To: | bug-poe-component-client-http [...] rt.cpan.org |
From: | Charles Reiss <gtg303y [...] mail.gatech.edu> |
Subject: | invalid requests cause crash (with patch) |
Date: | Mon, 25 Jul 2005 15:03:41 -0400 |
POE::Component::Client::HTTP does not correctly handle requests with
malformed or non-existent host-parts, e.g. a request for 'http:bad'.
It would just die after PoCoClientKeepalive's allocate() croak()'d.
This patch makes PoCoClientHTTP return a 400 (Malformed Request)
error with the $@ from eval { ... } around the connection allocation.
I modified 01_request.t to test this. I do there unusually use call()
instead of post() since the error response is generated in the
poco_weeble_request and cannot be in queue when check_counts is
called if we want to get a correct count. I also modified the test to
count responses recieved so check_counts behaves correctly except
with respect to responses in transit.
My patch is attached (I hope!)
-- Charles "woggle" Reiss
Message body is not shown because sender requested not to inline it.