diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/fetch.c | 15 | ||||
-rw-r--r-- | content/fetchcache.c | 1 |
2 files changed, 3 insertions, 13 deletions
diff --git a/content/fetch.c b/content/fetch.c index 295324484..6d35cb29c 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -26,7 +26,6 @@ #include <strings.h> #include <time.h> #include "curl/curl.h" -#include "libxml/uri.h" #include "netsurf/utils/config.h" #include "netsurf/content/fetch.h" #ifdef riscos @@ -41,6 +40,7 @@ #endif #include "netsurf/utils/log.h" #include "netsurf/utils/messages.h" +#include "netsurf/utils/url.h" #include "netsurf/utils/utils.h" @@ -174,19 +174,12 @@ struct fetch * fetch_start(char *url, char *referer, struct fetch *fetch = xcalloc(1, sizeof(*fetch)), *host_fetch; CURLcode code; CURLMcode codem; - xmlURI *uri; #ifdef WITH_AUTH struct login *li; #endif LOG(("fetch %p, url '%s'", fetch, url)); - uri = xmlParseURI(url); - if (uri == 0) { - LOG(("warning: failed to parse url")); - return 0; - } - /* construct a new fetch structure */ fetch->callback = callback; fetch->had_headers = false; @@ -199,9 +192,7 @@ struct fetch * fetch_start(char *url, char *referer, fetch->referer = xstrdup(referer); fetch->p = p; fetch->headers = 0; - fetch->host = 0; - if (uri->server != 0) - fetch->host = xstrdup(uri->server); + fetch->host = url_host(url); fetch->content_length = 0; #ifdef WITH_POST fetch->post_urlenc = 0; @@ -216,8 +207,6 @@ struct fetch * fetch_start(char *url, char *referer, fetch->prev = 0; fetch->next = 0; - xmlFreeURI(uri); - /* look for a fetch from the same host */ if (fetch->host != 0) { for (host_fetch = fetch_list; diff --git a/content/fetchcache.c b/content/fetchcache.c index 3639c39a0..21b50ee0b 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -24,6 +24,7 @@ #include "netsurf/content/fetch.h" #include "netsurf/utils/log.h" #include "netsurf/utils/messages.h" +#include "netsurf/utils/url.h" #include "netsurf/utils/utils.h" |