Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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)



From rg [...] cosma.name Thu Jun 2 11: 42:34 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-5.951 tagged_above=-99.9 required=10 tests=[AWL=0.686, BAYES_00=-1.9, HTML_MESSAGE=0.001, HTML_OBFUSCATE_05_10=0.26, NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_HI=-5, WEIRD_PORT=0.001] autolearn=ham
X-Spam-Flag: NO
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/alternative; boundary=20cf3071c808b9f2de04a4bc7bae
Message-ID: <BANLkTin77auHx8MwY3+V0jWMBYnHwoQbnA [...] mail.gmail.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -5.951
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id E26762401F4 for <cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com>; Thu, 2 Jun 2011 11:42:33 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PTOQZA2vgjUa for <cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com>; Thu, 2 Jun 2011 11:42:32 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id A270324015E for <bug-HTTP-Request-StreamingUpload [...] rt.cpan.org>; Thu, 2 Jun 2011 11:42:31 -0400 (EDT)
Received: (qmail 1952 invoked by uid 103); 2 Jun 2011 15:42:30 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 2 Jun 2011 15:42:30 -0000
Received: from mail-vw0-f50.google.com (HELO mail-vw0-f50.google.com) (209.85.212.50) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 02 Jun 2011 08:42:27 -0700
Received: by vws14 with SMTP id 14so765120vws.9 for <bug-HTTP-Request-StreamingUpload [...] rt.cpan.org>; Thu, 02 Jun 2011 08:42:23 -0700 (PDT)
Received: by 10.52.177.106 with SMTP id cp10mr1106924vdc.199.1307029343433; Thu, 02 Jun 2011 08:42:23 -0700 (PDT)
Received: by 10.52.169.74 with HTTP; Thu, 2 Jun 2011 08:42:23 -0700 (PDT)
Delivered-To: cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com
Subject: PUT request fails with Apache's mod_proxy
Return-Path: <rg [...] cosma.name>
X-RT-Mail-Extension: http-request-streamingupload
X-Original-To: cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Thu, 2 Jun 2011 17:42:23 +0200
X-Spam-Level:
To: bug-HTTP-Request-StreamingUpload [...] rt.cpan.org
From: Razvan Cosma <rg [...] cosma.name>
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Content-Length: 2312
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).
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 3051
From rg [...] cosma.name Tue Jun 7 04: 25:29 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.253 tagged_above=-99.9 required=10 tests=[AWL=0.646, BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-18808-1307029355-1780.68609-3-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-68609 [...] rt.cpan.org> <BANLkTin77auHx8MwY3+V0jWMBYnHwoQbnA [...] mail.gmail.com> <rt-3.8.HEAD-18808-1307029355-1780.68609-3-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <BANLkTi=uQi6qMBxWX2RSqFs_SbJfWh9aBg [...] mail.gmail.com>
Content-Type: multipart/alternative; boundary=bcaec54307acd8e0fb04a51af542
X-Spam-Score: -6.253
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 8D9B524036D for <cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com>; Tue, 7 Jun 2011 04:25:29 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ox0hrhHcJXro for <cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com>; Tue, 7 Jun 2011 04:25:27 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 609992400C3 for <bug-HTTP-Request-StreamingUpload [...] rt.cpan.org>; Tue, 7 Jun 2011 04:25:25 -0400 (EDT)
Received: (qmail 23792 invoked by uid 103); 7 Jun 2011 08:25:25 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Jun 2011 08:25:25 -0000
Received: from mail-px0-f169.google.com (HELO mail-px0-f169.google.com) (209.85.212.169) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Tue, 07 Jun 2011 01:25:22 -0700
Received: by pxi9 with SMTP id 9so3545801pxi.0 for <bug-HTTP-Request-StreamingUpload [...] rt.cpan.org>; Tue, 07 Jun 2011 01:25:19 -0700 (PDT)
Received: by 10.68.41.134 with SMTP id f6mr86659pbl.273.1307435119206; Tue, 07 Jun 2011 01:25:19 -0700 (PDT)
Received: by 10.68.47.34 with HTTP; Tue, 7 Jun 2011 01:25:19 -0700 (PDT)
Delivered-To: cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #68609] AutoReply: PUT request fails with Apache's mod_proxy
Return-Path: <rg [...] cosma.name>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+HTTP-Request-StreamingUpload [...] hipster.bestpractical.com
X-RT-Mail-Extension: http-request-streamingupload
Date: Tue, 7 Jun 2011 10:25:19 +0200
X-Spam-Level:
To: bug-HTTP-Request-StreamingUpload [...] rt.cpan.org
From: Razvan Cosma <rg [...] cosma.name>
RT-Message-ID: <rt-3.8.HEAD-18807-1307435130-189.68609-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Content-Length: 567
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
Content-Type: text/html; charset=UTF-8
X-RT-Original-Encoding: utf-8
Content-Length: 772


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.