cURL / Mailing Lists / curl-library / Single Mail


Re: [PATCH] TFTP portability fix

From: Daniel Stenberg <>
Date: Tue, 9 May 2006 00:00:58 +0200 (CEST)

On Mon, 8 May 2006, Dan Fandrich wrote:

>> I agree. And the simple fix to make it do this is to simply skip the first
>> character of the filename when including it in the TFTP package, isn't it?
> I would expect that to work, if you can guarantee that the first character
> will always be a slash (I wasn't sure if that was a valid assumption).

Yeps, it can never end up in that function without an initial slash. The URL
parser always leaves the slash and for the the "tftp://host" case it sets the
default path to be just "/".

> And something sane has to happen if someone tries to upload/download a URL
> like "tftp://host" without a path.

In this case, the path will be a single slash "/", so if we skip that the file
name part will be completely blank!

  Commercial curl and libcurl Technical Support:
Received on 2006-05-09