curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: CURLUPART_PATH not inserting leading slash

From: Timothe Litt <litt_at_acm.org>
Date: Thu, 8 Jun 2023 05:49:52 -0400

On 08-Jun-23 03:18, Daniel Stenberg via curl-library wrote:
> On Thu, 8 Jun 2023, Pedro Henrique via curl-library wrote:
>
>> but the code below results in 400 Bad Request due to the lack of the
>> forward slash.
>> So is it a bug or not?
>
> I can confirm that this is a bug and that it still exists in current
> code.
>
> If you set the path like that and extract the full URL it works, but
> not if you set the path and then extract the path.
>
> I'll fix and make sure we add test cases for this. Thanks for reporting!
>

> CURLUPART_PATH
>
> If a path is set in the URL without a leading slash, a slash will be inserted automatically when this URL is read from the handle.

While you're at it, doc should be "trailing slash".  "leading" - the
beginning (left).  "trailing" - the end (right).

Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.



-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-06-08