cURL / Mailing Lists / curl-library / Single Mail


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

From: Robson Braga Araujo <>
Date: Fri, 10 Aug 2007 15:58:01 -0300

This change broke curlftpfs too. I don't see your point of "loads of existing
applications that use NOBODY today with the current meaning". Loads of
FTP applications used the NOBODY option with the previous meaning too
and you just broke them nonetheless. Why do you think that printing an
Accept-ranges: bytes is ok for an FTP connection?

Also I get the following stack trace when using the NOBODY option in 7.16.4:

#0 0xb7ee555c in Curl_client_write (conn=0x8065058,
    type=<value optimized out>, ptr=0xb7f05c10 "Accept-ranges: bytes\r\n",
    len=0) at sendf.c:180
#1 0xb7ee8497 in ftp_statemach_act (conn=0x8065058) at ftp.c:2126
#2 0xb7ee9428 in ftp_easy_statemach (conn=0x8065058) at ftp.c:2896
#3 0xb7ee9f95 in Curl_ftp (conn=0x8065058, done=0xb7b931fa) at ftp.c:3458
#4 0xb7eedf8a in Curl_do (connp=0xb7b931f4, done=0xb7b931fa) at url.c:4299
#5 0xb7efa595 in Curl_perform (data=0x805c798) at transfer.c:2421
#6 0xb7efafbe in curl_easy_perform (curl=0x805c798) at easy.c:492

I suspect this is because you're passing a constant array there on
ftp.c:2126 and trying to change it on sendf.c:180.

On 7/16/07, Daniel Stenberg <> wrote:
> 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:

   "The inside of my head was exploding with fireworks. Fortunately,
   my last thought turned out the lights when it left."
              --- Calvin
Received on 2007-08-10