summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c15
1 files changed, 2 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;