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: [Feature Request] Optional flag to disable path normalization for libcurl's URL API

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 21 Feb 2021 13:53:46 +0100 (CET)

On Sun, 21 Feb 2021, coder man via curl-library wrote:

> Unfortunately, the URL API does not have such a thing to disable path
> normalization while parsing the URLs:
>
> https://curl.se/libcurl/c/curl_url_set.html

There actually is! It just seems to be missing from the documentation...

CURLU_PATH_AS_IS is at least acknowledged when you set a URL with
curl_url_set(). Try using it like this:

    curl_url_set(url_handle, CURLUPART_URL, "
                 http://www.example.com/../../path", CURLU_PATH_AS_IS);

... I'll make a PR to make sure it gets added to the man page!

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2021-02-21