cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Couldn't receive the body of the requested URL

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Tue, 2 Feb 2010 14:43:16 +0100

 
Michael Wood wrote:

> Indeed, the following prints the body:

> curl http://tube.com/sports

Tried it too: data <html><head>.....</head></html> Stupid data

The second time I submitted it, data are empty.

But using the --verbose flag, I saw the HTTP status is 302 found, so we
need a redirection:

curl -L http://tube.com/sports

works far better: you even get "real" html data !

As a consequence, I think the only needed option is
CURLOPT_FOLLOWLOCATION=1

Patrick
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-02