Re: curl extension downloads 1 byte only from zip files
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: curl extension downloads 1 byte only from zip files

From: Andy Hassall <andy@andyh.co.uk>
Date: Tue Jul 12 2005 - 22:36:33 CEST

On 12 Jul 2005 12:57:35 -0700, "benji" <benpjohnson@gmail.com> wrote:

>I have set up a system to download datafeeds in pain text or zipped.
>The download part of this system uses the curl extension to download
>the files.
>
>All was well when I tested it with various datafeeds in zipped and
>unzipped formats until I came to download zipped files from the
>affiliate program we are starting with.
>
>I have verified that the datafeeds download properly in Internet
>Explorer but interestingly they also fail in Firefox.
>
>Plain text files will download correctly from the same server with the
>curl script.
>
>Using curl to download a file results in a 1 byte file. Downloading
>with Firefox produces a 4kb corrupted zip file. I have tried multiple
>files all with the same result.
>
>A php script appears to be being used to create the zips on the fly?
>could this be the cause of the problem?

 Minimal example code reproducing the problem?

 Example URL?

 First place to look would be the Content-type header.

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Mon Oct 24 02:08:42 2005