Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: james [...] aipco.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.894
Fixed in: (no value)



Subject: HTTP/1.1 100 Continue
ON Linux, kernel 2.6.18 If the server responsed with "HTTP/1.1 100 Continue", POE-Component- Client-HTTP just return the header Here is the result from the copy: HTTP/1.1 100 Continue Date: Wed, 10 Feb 2010 18:06:51 GMT Server: Microsoft-IIS/5.0 Expires: Thu, 01 Dec 1994 16:00:00 GMT Set-Cookie: SITESERVER=ID=bf927e3b4a265c2338ff84c2292ea4f4; expires=Monday, 01-Jan-2035 00:00:00 GMT; path=/; domain=.somedomain.com X-PCCH-Peer: 123.123.789.123.80 X-Powered-By: ASP.NET
From: james [...] aipco.com
For the "100-continue", I add one line code at line# 666 on HTTP.pm It works for me. #line644 # Some responses are without content by definition # FIXME: #12363 # Make sure we finish even when it isn't one of these, but there # is no content. if ( $request->[REQ_HTTP_REQUEST]->method eq 'HEAD' or $input->code =~ /^(?:1|[23]04)/ or ( defined($input->content_length()) and $input->content_length() == 0 ) ) { if (_try_redirect($request_id, $input, $request)) { my $old_request = delete $heap->{request}->{$request_id}; delete $heap->{wheel_to_request}->{$wheel_id}; if (defined $old_request) { DEBUG and warn "I/O: removed request $request_id"; $old_request->remove_timeout(); delete $heap->{ext_request_to_int_id}{$old_request-> [REQ_HTTP_REQUEST]}; $old_request->[REQ_CONNECTION] = undef; } return; #line 666 } # add by James if( $input->code == 100 ) { return; } # End James $request->[REQ_STATE] |= RS_DONE; $request->remove_timeout(); _finish_request($heap, $request, 1); return; On Wed Feb 10 13:34:44 2010, JameY wrote: Show quoted text
> ON Linux, kernel 2.6.18 > If the server responsed with "HTTP/1.1 100 Continue", POE-Component- > Client-HTTP just return the header > > Here is the result from the copy: > HTTP/1.1 100 Continue > Date: Wed, 10 Feb 2010 18:06:51 GMT > Server: Microsoft-IIS/5.0 > Expires: Thu, 01 Dec 1994 16:00:00 GMT > Set-Cookie: SITESERVER=ID=bf927e3b4a265c2338ff84c2292ea4f4; > expires=Monday, 01-Jan-2035 00:00:00 GMT; path=/;
domain=.somedomain.com Show quoted text
> X-PCCH-Peer: 123.123.789.123.80 > X-Powered-By: ASP.NET
Can you please provide a test case so that I can verify the issue and that your patch fixes it? Thank you.
From: james [...] aipco.com
On Sun Feb 14 21:31:46 2010, RCAPUTO wrote: Show quoted text
> Can you please provide a test case so that I can verify the issue and > that your patch fixes it? Thank you.
From: james [...] aipco.com
On Sun Feb 14 21:31:46 2010, RCAPUTO wrote: Show quoted text
> Can you please provide a test case so that I can verify the issue and > that your patch fixes it? Thank you.
Please check the code in attachment I use it to test "100-continue"
Subject: t.pl
package tt; use strict; use HTTP::Cookies; use HTML::Form; use HTTP::Request::Common qw(GET POST); use POE qw(Component::Client::HTTP); use POE::Component::Client::Keepalive; my $pool = POE::Component::Client::Keepalive->new( keep_alive => 2, # seconds to keep connections alive max_open => 500, # max concurrent connections - total max_per_host => 20, # max concurrent connections - per host timeout => 300, # max time (seconds) to establish a new connection ); POE::Component::Client::HTTP->spawn ( Agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)', Alias => 'uaa', Timeout => 300, FollowRedirects => 3, ConnectionManager => $pool, ); POE::Session->create( package_states => [ "tt" => [ "_start", "got_response", "_stop" ] ] ); $poe_kernel->run(); sub got_response { my ( $heap, $request_packet, $response_packet, $kernel ) = @_[ HEAP, ARG0, ARG1, KERNEL ]; my $http_request = $request_packet->[0]; my $subject = $request_packet->[1][0]; my $http_response = $response_packet->[0]; print $http_response->as_string; } sub _start { my ( $kernel, $heap ) = @_[ KERNEL, HEAP ]; my $session = $kernel->get_active_session(); my $request = { "title" => [ "CHRIS", ], "action" => POST( "http://www.chriselectronics.com/inventory.cfm", [ "whatToSearch" => 1, "searchCriteria" => 'NRC04F1212TR', ], ), }; $kernel->post( 'uaa', 'request', 'got_response', $request->{action}, $request->{title} ); } sub _stop { print "Stop\n"; }
Sorry for the delay. Your test case returns an HTTP/1.1 200 OK now. Is there some other site I can query to get a 100 Continue with content? Thanks!
No response in over 3 years.