Repository navigation
Conversation
|
looks good to me, there is some good inspiration over at https://github.com/uriparser/uriparser/blob/master/test/test.cpp |
There was a problem hiding this comment.
Minor nit: An unnecessary empty line slipped in here.
|
Is there any reason why CURLUcode curl_url(char *URL, CURLURL **urlhandle, unsigned int flags)This function makes a call to UPDATE: Forgot to say: Thanks for this API, it is very useful! |
|
No reason at all really. It's just an old weakness of mine to skip out on the 'const's... I'll fix. Thanks! |
|
More minor fixes, squashed and rebased. |
There was a problem hiding this comment.
Thanks for the constifying, it's looking good! One minor: curl_url() prototype above needs to be synced with this change.
|
I think coveralls got some hiccups there when it claims a -3.4% less test coverage, as this patch provides quite a bit of testing already. I'm ignoring that for now, as I hope to add more tests anyway as I go along and fix the remaining parts. |
|
I'm not entirely happy with how Current CURLURL *h;
rc = curl_url("http://example.com", &h, 0); /* create handle *I suspect that way of storing the handle pointer is going to cause users grief. A bit too unusual. New CURLURL *h = curl_url(); /* create handle */
curl_url_set(h, CURLUPART_URL, "http://example.com", 0);It is more in style with how our other APIs work and makes sure there's one single way to set URL in the handle, Syntax-check a URLA downside with this approach is that there's no longer any "shortcut" for just syntax-checking a URL without creating a handle, but then again I'm not convinced that's a very important feature. |
|
I've synced the wiki page to match how the current patch implements the API. |
The URL API. Man pages with all the details and a fair amount of tests are included. I encourage all interested parties to try it out and report your experiences, both good and bad!
I'm saving these items until after the initial merge and done as separate PRs:
CURLOPT_CURLUto allow passing in a URL handle to work with