cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Simple HTTP PUT - response content printed to screen

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 26 Jan 2013 13:42:02 +0100

On Sat, Jan 26, 2013 at 06:54:25AM -0500, Joe Lorenz wrote:
> Oh. I hadn't considered that since a 201 or a 200 response doesn't
> get printed and nothing prints out for a GET or file transfers with
> other protocols.

libcurl prints whatever is sent for (most) status codes; after all, that's
generally the reason someone does a GET on a resource--to obtain the data
there. Some HTTP status codes don't include a body, so naturally there's
nothing to print there. Try taking a look at the headers in the cases where
nothing is printed--you'll probably see a Content-Length: 0 (or equivalent)
in the response.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-26