curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: a URL API ?

From: Dan Fandrich via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 12 Aug 2018 02:43:30 +0200

On Thu, Aug 09, 2018 at 10:48:32AM +0200, Daniel Stenberg via curl-library wrote:
> Returning to this, as I've polished the API a bit over the last few days.
> The wiki page has been updated to reflect the changes I've done.

I'm curious whether the API can be used to canonicalize a URL, i.e., URL decode
parts that can be decoded without semantic difference but canonicalize those
parts that the specs say must be encoded. The idea would be that the output of
canonicalization would be the same for every version of a URL passed in. I'm
guessing that url_url_get(h, CURLUPART_URL, &lost, CURLU_URLDECODE); would get
you half way there, except that it might not encode parts that have to be
encoded. Is there another way I'm missing?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-12