diff options
author | Mike Hommey <mh@glandium.org> | 2004-04-19 05:38:48 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-04-19 05:38:48 +0000 |
commit | 81bcf076ea11e114a60e429338a15748066de163 (patch) | |
tree | 276010ab5d17f27a96c05f77004aa84a1763af7b /nanohttp.c | |
parent | d09ab089457ae3c20cc98f9afa03379c6ebf9598 (diff) | |
download | libxml2-81bcf076ea11e114a60e429338a15748066de163.tar.gz |
Load /tmp/tmp.LovooJ/libxml2-2.6.9 intoupstream/2.6.9
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'nanohttp.c')
-rw-r--r-- | nanohttp.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -840,7 +840,15 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { while ((*cur == ' ') || (*cur == '\t')) cur++; if (ctxt->location != NULL) xmlFree(ctxt->location); - ctxt->location = xmlMemStrdup(cur); + if (*cur == '/') { + xmlChar *tmp_http = xmlStrdup(BAD_CAST "http://"); + xmlChar *tmp_loc = + xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname); + ctxt->location = + (char *) xmlStrcat (tmp_loc, (const xmlChar *) cur); + } else { + ctxt->location = xmlMemStrdup(cur); + } } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"WWW-Authenticate:", 17)) { cur += 17; while ((*cur == ' ') || (*cur == '\t')) cur++; |