Closed Bara closed 3 years ago
It looks like libcurl will do this with any invalid URL. As URL validation is complex, I don't think it's worth the time to deal with this.
How about a simple string length check, as example strings with a length of 2 or lower are invalid.
I think libcurl will happily accept "a"
, if there is such a hostname. But I will throw an exception when the base URL is empty, that makes sense.
This was fixed in 6e7dc5a, I plan to release it soon.
That's not really important, but I think that's worth to mention. With empty base url the returned handle is valid, but if we use this handle with simple Get, it returns status code 0 with empty error message. That's bit confusing while debugging.
Example plugin
Output is