cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl and incorrect content-length

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

On Sun, Feb 22, 2009 at 7:13 AM, Daniel Stenberg <daniel_at_haxx.se> 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
source.

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.

Dave

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-02-22