Skip Menu |

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

Report information
The Basics
Id: 40318
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: HTTP-DAV

People
Owner: OPERA [...] cpan.org
Requestors: OPERA [...] cpan.org
wchao [...] yahoo.com
Cc: pcollins [...] cpan.org
AdminCc:

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



CC: pcollins [...] cpan.org
Subject: Getting a resource directly to *STDOUT doesn't work in v0.34
Hi, I upgraded to HTTP::DAV 0.34 and now experience a bug. I was previously using HTTP::DAV 0.31 and the following code worked: $dav->get("-url" => $file_url, "-to" => \*STDOUT, "-callback" => sub {}) or die "couldn't get $file_url: " . $dav->message(); Basically I am outputting a file from the WebDAV repository to the standard output. I'm retrieving a file from a WebDAV repository and want to display it to the remote end (a web browser) without slurping the file into memory. Note the empty callback parameter. I had to do this because for some strange reason, in DAV.pm you have the following line 387: if ($callback || ref($local_name) =~ /SCALAR/ ) { Note that you do not check for a GLOB (which my \*STDOUT clearly refers to). Therefore, I passed in an empty callback to get that block of code to execute even though there was no real callback. That worked fine in 0.31. Now I find that it does not work in 0.34. I tried modifying DAV.pm so that the line instead reads: if ($callback || ref($local_name) =~ /GLOB/ || ref($local_name) =~ / SCALAR/ ) { It now will process the GLOB without requiring me to pass in a dummy callback, but it still doesn't print out the stream of bytes. I do see that the DAV server is actually serving up the bytes to the DAV client (HTTP::DAV), but it is not being passed along to the web browser, which means HTTP::DAV is not spitting out the bytes to STDOUT. Do you know what is wrong?
Hi Wellie, I can try to reproduce your problem. However, it would be nice to know which version of HTTP::DAV introduced this problem. Can you try the same test/script with HTTP::DAV v0.32 and v0.33?
CC: <pcollins [...] cpan.org>
Subject: RE: [rt.cpan.org #40318] Getting a resource directly to *STDOUT doesn't work in v0.34
Date: Sat, 25 Oct 2008 17:59:32 -0400
To: <bug-HTTP-DAV [...] rt.cpan.org>, <wchao [...] yahoo.com>
From: "Wellie W. Chao" <wchao [...] microoffice.us>
Hello, I tested it at your request and found the following: HTTP::DAV v0.31 works HTTP::DAV v0.32 works HTTP::DAV v0.33 works HTTP::DAV v0.34 DOES NOT WORK I did these tests without changing anything else. All I did was download the appropriate HTTP::DAV tar file from CPAN and swap out /usr/lib/perl5/vendor_perl/5.8.8/HTTP/DAV.pm and the files in /usr/lib/perl5/vendor_perl/5.8.8/HTTP/DAV/ (such as Comms.pm, Lock.pm, etc.). I am running CentOS 5.2 on x86_64 platform, if that makes a difference. Something must have changed between 0.33 and 0.34 that breaks the file handle output capability, at least for STDOUT. I have also attached two relevant Perl code files, in case they help. Show quoted text
-----Original Message----- From: Opera Software ASA via RT [mailto:bug-HTTP-DAV@rt.cpan.org] Sent: Thursday, October 23, 2008 4:48 PM To: wchao@yahoo.com Cc: pcollins@cpan.org Subject: [rt.cpan.org #40318] Getting a resource directly to *STDOUT doesn't work in v0.34 <URL: http://rt.cpan.org/Ticket/Display.html?id=40318 > Hi Wellie, I can try to reproduce your problem. However, it would be nice to know which version of HTTP::DAV introduced this problem. Can you try the same test/script with HTTP::DAV v0.32 and v0.33?

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

RT-Send-CC: wchao [...] yahoo.com
Hi, please can you try the attached DAV.pm ? It's marked as development version, v0.34_01. It should solve your problem. Unfortunately, I have no test environment here at home, so I can't ensure it's bug free. It should work if my understanding of the problem is correct. Let me know. Thanks! -- Cosimo

Message body is not shown because it is too large.

CC: pcollins [...] cpan.org
Subject: Re: [rt.cpan.org #40318] Getting a resource directly to *STDOUT doesn't work in v0.34
Date: Sun, 2 Nov 2008 21:18:45 -0500 (EST)
To: Opera Software ASA via RT <bug-HTTP-DAV [...] rt.cpan.org>
From: "Wellie W. Chao" <wchao [...] microoffice.us>
Yes, this new version fixes the problem. Thank you! Do you plan to update CPAN with this version, or are you going to wait? The reason I ask is that I try to keep my systems updated via yum (CentOS and the DAG repositories). They won't post updated RPMs until they see CPAN has been updated. On Sun, 2 Nov 2008, Opera Software ASA via RT wrote: Show quoted text
> Date: Sun, 02 Nov 2008 11:22:19 -0500 > From: Opera Software ASA via RT <bug-HTTP-DAV@rt.cpan.org> > To: wchao@yahoo.com > Cc: pcollins@cpan.org > Subject: [rt.cpan.org #40318] Getting a resource directly to *STDOUT doesn't > work in v0.34 > > <URL: http://rt.cpan.org/Ticket/Display.html?id=40318 > > > Hi, > > please can you try the attached DAV.pm ? It's marked as development > version, v0.34_01. It should solve your problem. > Unfortunately, I have no test environment here at home, so I can't > ensure it's bug free. It should work if my understanding of the problem > is correct. > > Let me know. Thanks! > >
Fixed in HTTP-DAV v0.35, already out on CPAN.