]> granicus.if.org Git - libevent/commitdiff
https-client: correctly handle URLs with no path (like "https://host:port")
authorAndrey Skriabin <nifigase@gmail.com>
Thu, 2 Apr 2015 17:42:54 +0000 (20:42 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Wed, 19 Aug 2015 09:28:03 +0000 (12:28 +0300)
path == NULL check removed

Fixes: #233
Fixes: #234
sample/https-client.c

index fbd5de8c59c2a8be4382a15a4182796d9919a3ca..38f07e9cc3948ef498a22dd2a14a00c1d16bca32 100644 (file)
@@ -275,7 +275,7 @@ main(int argc, char **argv)
        }
 
        path = evhttp_uri_get_path(http_uri);
-       if (path == NULL) {
+       if (strlen(path) == 0) {
                path = "/";
        }