Skip Menu |
 

This queue is for tickets about the HTTP-Request-StreamingUpload CPAN distribution.

Report information
The Basics
Id: 68609
Status: new
Priority: 0/
Queue: HTTP-Request-StreamingUpload

People
Owner: Nobody in particular
Requestors: rg [...] cosma.name
Cc:
AdminCc:

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



Subject: PUT request fails with Apache's mod_proxy
Date: Thu, 2 Jun 2011 17:42:23 +0200
To: bug-HTTP-Request-StreamingUpload [...] rt.cpan.org
From: Razvan Cosma <rg [...] cosma.name>
Download (untitled) / with headers
text/plain 2.2k
Hello, I am trying to get a file up on a Puppet server, which supports a REST API briefly documented here: docs.puppetlabs.com<http://docs.puppetlabs.com/guides/rest_api.html> I get a "..timeout specified has expired: proxy: prefetch request body failed to 127.0.0.1:18140" in apache's log. GETs do work, just PUTs fail. Config is Listen 8140 <Proxy balancer://puppetmaster> BalancerMember http://127.0.0.1:18140 BalancerMember http://127.0.0.1:18141 </Proxy> <VirtualHost *:8140> SSLEngine On SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/server.pem SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem SSLVerifyClient require SSLVerifyDepth 1 SSLOptions +StdEnvVars RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e <Location /> SetHandler balancer-manager Order allow,deny Allow from all </Location> ProxyPass / balancer://puppetmaster/ ProxyPassReverse / balancer://puppetmaster/ ProxyPreserveHost On ErrorLog /mirror/log/balancer_error_log CustomLog /mirror/log/balancer_access_log "%h %l %u %t \"%r\" %>s %b \"%{SSL_CLIENT_S_DN}x\" \"%{User-Agent}i\"" </VirtualHost> and the perl code is { open my $up, "<", "$_[0]" or die "Something went wrong: ".$!; binmode $up; my $ck = Digest::MD5->new; $ck->addfile($up); close $up; my $req = HTTP::Request::StreamingUpload->new( PUT => "https://".$server."/file_bucket_file/md5/".$ck->hexdigest, path => $_[0], headers => HTTP::Headers->new( 'Content-Type' => 'application/binary', 'Content-Length' => -s $_[0], 'Accept' => 's', ), ); my $res = $ua->request($req); die "Something went wrong: ".$res->status_line unless $res->is_success; return $res->content; } SSL handshake does work, but the puppet process doesn't seem to receive any data (I'm tailing its debug log).
Subject: Re: [rt.cpan.org #68609] AutoReply: PUT request fails with Apache's mod_proxy
Date: Tue, 7 Jun 2011 10:25:19 +0200
To: bug-HTTP-Request-StreamingUpload [...] rt.cpan.org
From: Razvan Cosma <rg [...] cosma.name>
Download (untitled) / with headers
text/plain 567b
Could be an Apache bug, some googling for the error message showed an old bug ("mod_proxy fails to send post request to backend server"), usually blamed on IE. Another style of invocation does work: my $req = HTTP::Request::StreamingUpload->new( PUT => "https://$server", callback => sub { shift @chunk }, headers => HTTP::Headers->new( 'Content-Type' => 'application/binary', 'Content-Length' => 9, 'Accept' => 's', ), ); my $res = $ua->request($req); My httpd is 2.2.15 though (RH6), and it should have been fixed in 2.2.9


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.