cURL / Mailing Lists / curl-users / Single Mail


Re: Curl and incorrect content-length

From: Dave Artz <>
Date: Sun, 22 Feb 2009 12:06:50 -0500

On Sun, Feb 22, 2009 at 7:13 AM, Daniel Stenberg <> wrote:

> On Sat, 21 Feb 2009, Dave Artz wrote:
> I noticed it did not return the full page (40617 bytes) as it does in a
>> web browser.
> [...]
> I tried the --ignore-content-length flag and this did not help. I also
>> need to fetch from the PHP implementation where this flag doesn't (seem to)
>> exist.
> That's a PHP/CURL flaw then that you'd need to take to the PHP team.

Since this was behaving the same way with the command line tool, I figured
I'd post here, though I agree this isn't just a curl issue (see below).

> Is there a way to force curl into downloading the entire page?
> I would suggest you start comparing --trace-ascii outputs with
> LiveHTTPHeader outputs and make sure that A) the responses really are the
> same apart from the sizes the clients receive and B) the embedded
> javascripts aren't what makes theb browser return the files differently!

I see the full source in the response using Firebug/Firefox on OS X. Nothing
interesting in --trace-ascii.

Disabling JavaScript was one of the first things I tried, also returns full

However, I just tested PHP's fopen and fsockopen functions and they fail
similarly after 8192 bytes.

I'm thinking there's no way around this issue, not sure why web browsers
behave differently.

I'm out of ideas, any final thoughts? Thanks for your time.


List admin:
Received on 2009-02-22