cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3026253 ] hashmark in filename truncates filename

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 07 Jul 2010 17:41:53 +0000

Bugs item #3026253, was opened at 2010-07-07 11:51
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3026253&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Roberto Filippone (filippone)
Assigned to: Daniel Stenberg (bagder)
Summary: hashmark in filename truncates filename

Initial Comment:
Feature introduced in 7.20.0 ("fragment part of URLs are no longer sent to the server") prevents us from using filenames which contain hashmarks.
Hashmarks in filenames are a requirement from our client and cannot be changed.
Protocol is sftp.
7.19.6 works like a charm.
Is there a workaround for this?

// code snippet
            FILE *hd_src = fopen(sFrom.c_str(), "rb");
            
            curl_global_init(CURL_GLOBAL_ALL);
            CURL *curl = curl_easy_init();
            res = curl_easy_setopt((CURL*)curl, CURLOPT_USERPWD, sAuth.c_str());
            curl_easy_setopt(curl, CURLOPT_URL, sTo.c_str());
            curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
            curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
            
            CURLcode res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            
            curl_global_cleanup();

            fclose(hd_src);
        
sample filename:
sftp://<server>/<path>/GSC#TR#RapidEye#DAP_MG2_99#20100706#160003.xml

Greetings

--
Roberto
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Date: 2010-07-07 19:41
Message:
That's not a bug actually.
Hash marks need to be URL-encoded as %23 within a URL if they're not
intended for the fragment part.
----------------------------------------------------------------------
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3026253&group_id=976
Received on 2010-07-07

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET