cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Change in FTP output from 7.16.2 and 7.16.4.....

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 16 Jul 2007 22:56:32 +0200 (CEST)

On Sun, 15 Jul 2007, Philip Butler wrote:

> When I upgraded from 7.16.2 to 7.16.4, I have noticed a change in behavior.
> Now, when doing an FTP delete, I get the string "Accept-ranges: bytes"
> output to stdout. I have tried turning this off with the following, but
> nothing seems to make a difference.

Okay, I've had a look and the fix isn't crystal clear to me. Let me explain:

The CURLOPT_NOBODY option has been used to mean "do a request similar to what
HEAD is to HTTP" for a very long time. For HTTP it is clearly documented to do
a HEAD request.

Your code uses this option, but I take it you really only are after the "give
me no content body" part of the meaning and you really don't care much for the
HEAD-like data that comes with this.

An idea to consider would probably be to split this option into two:

  1) one that says give me no content body transfer

  and

  2) one that says do HEAD or HEAD-like operations

The problem with this approach is that there are loads of existing
applications that use NOBODY today with the current meaning so we can of
course not change that, we would need to introduce two new options.

So, in the short term there's no easy with to "fix" this problem since you see
this due to a bugfix that was made in libcurl so the only reason you didn't
see that before was because libcurl has a bug!

> Any hints would be appreciated as to how I can turn off the 'Accept-ranges:
> bytes' message.

Edit the source code and recompile!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-07-16