cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problem with special character # on target file

From: Chenevard Alfredo <alfredo.chenevard_at_axa-tech.com>
Date: Tue, 24 Apr 2012 08:12:54 +0200

Message: 8
Date: Mon, 23 Apr 2012 20:36:31 +0200
From: Jochen Roderburg <Roderburg_at_Uni-Koeln.DE>
To: curl-users_at_cool.haxx.se
Subject: Re: Problem with special character # on target file
Message-ID: <20120423203631.10867jr9732ytstr_at_webmail.uni-koeln.de>
Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed"

Zitat von Daniel Stenberg <daniel_at_haxx.se>:

> On Mon, 23 Apr 2012, Jochen Roderburg wrote:
>
>> Now I could verify that my assumption about url-encoding the
>> #-character was correct. sftp://host/ga%23.txt creates the filename
>> ga#.txt on the server side while sftp://host/ga#.txt creates just
>> ga as the OP reported. Looks like the #-part of the URL gets a
>> special treatment somewhere in the sftp pipeline.
>
> Right. The # signals a 'fragment' (using the RFC 3986 language)
> making the letter and the text to the right of it to get cut off and
> not sent to the remote server. IE it should not be used literally
> within a URL if wanted to get it passed through to the remote server.
>
> / daniel.haxx.se

Thanks for the clarification, now I understand it completely, it is
actually the other way round. The cut-off is done on *every* URL and
the (s)ftp URLs (for which the http usage of the #-constructs has no
real meaning) are "unexpected victims", because there is *no* special
treatment for them. ;-)

J.Roderburg

>> It's work! Thanks a lot to all!
Regards Alfredo

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-24