Skip Menu |

This queue is for tickets about the POE-Component-Client-HTTP CPAN distribution.

Report information
The Basics
Id: 43571
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

Owner: Nobody in particular
Requestors: APOCAL [...]
perl [...]

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: 0.88

Subject: POE Test assumes not.localhost does not exist.
Download (untitled) / with headers
text/plain 1.6k
I'm using the DNS servers provided by Suddenlink. Their DNS servers catch everything and relay it back to their own webserver. This is bad practice, not nice, and a shitty dns hack that results in huge security issues -- with that said the test t/01 fails with: not ok 11 - unexpected response # Failed test 'unexpected response' # at ./t/01_request.t line 175. # path(/badhost) code(400) # response((( # 400 Bad Request # # <html> # <HEAD><TITLE>Error: Bad Request</TITLE></HEAD> # <BODY> # <H1>Error: Bad Request</H1> # incomplete response b 6. Wanted 259 octets. Got 200. # </BODY> # </HTML> # ))) ok 12 - got 408 response for timed out request # Looks like you failed 1 test of 12. If I disable the test in the eof the fail sub for "incomplete response b". I get: # Failed test 'unexpected response' # at ./t/01_request.t line 175. # path(/badhost) code(302) # response((( # HTTP/1.1 302 Found # Connection: close # Date: Tue, 24 Feb 2009 08:51:32 GMT # Location: # Server: Apache/2.2.6 (Unix) PHP/5.2.5 mod_ssl/2.2.6 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.8.5 # Content-Length: 259 # Content-Type: text/html; charset=iso-8859-1 # # <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> # <html><head> # <title>302 Found</title> # </head><body> # <h1>Found</h1> # <p>The document has moved <a href=" /index.php?origURL= # ))) What is happening is my not.localhost exists, so I get a 200, with a bigger file size than you do. This triggers the eof failure because the max size is 200 octets and I'm getting 270ish. The fix is to use a better dead host. Maybe an IP that doens't exist
Subject: Tweak of t/01_request.t so it properly follow RFC for invalid hostname
Download (untitled) / with headers
text/plain 591b
Hello, After helping a friend track down why PoCo::Client::HTTP failed to install on his box, I found out that the hostname "not.localhost" actually resolves to something! This tiny patch makes sure it will never happen again, because the DNS RFC ( 2606 ) explicitly mentions this :) ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid. This patch simply replaces "not.localhost" with "not.localhost.invalid" so the test passes. Thanks again for applying this :) -- ~Apocalypse
Subject: pocohttp.patch
Download pocohttp.patch
text/x-diff 346b
--- t/01_request.t.orig 2009-03-07 10:32:59.000000000 -0500 +++ t/01_request.t 2009-03-07 10:33:09.000000000 -0500 @@ -66,7 +66,7 @@ ); my $port = $_[HEAP]->{testd}->port; my @badrequests = ( - GET("http://not.localhost/badhost"), + GET("http://not.localhost.invalid/badhost"), GET("file:///from/a/local/filesystem"), );
ECARROLL, can you confirm the committed patch works for you too?
confirmed, great patch. Did not know about .invalid pseduo tld.
Martijn resolved this in revision 363.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to