curl-users
Re: Problem with special character # on target file
Date: Mon, 23 Apr 2012 20:36:31 +0200
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
-------------------------------------------------------------------
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-23