soup_uri_copy_host: always set the path to something non-NULL
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 3 Feb 2012 17:47:54 +0000 (17:47 +0000)
committerDan Winship <danw@gnome.org>
Mon, 6 Feb 2012 22:12:26 +0000 (17:12 -0500)
Not doing so is considered to be invalid.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977

libsoup/soup-uri.c

index f091a82..f53decd 100644 (file)
@@ -1067,9 +1067,7 @@ soup_uri_copy_host (SoupURI *uri)
        dup->scheme = uri->scheme;
        dup->host   = g_strdup (uri->host);
        dup->port   = uri->port;
-       if (dup->scheme == SOUP_URI_SCHEME_HTTP ||
-           dup->scheme == SOUP_URI_SCHEME_HTTPS)
-               dup->path = g_strdup ("");
+       dup->path = g_strdup ("");
 
        return dup;
 }