--- nanohttp.c 2004-03-22 15:54:58.000000000 +0100 +++ nanohttp2.c 2004-03-31 16:07:25.000000000 +0200 @@ -840,7 +840,13 @@ while ((*cur == ' ') || (*cur == '\t')) cur++; if (ctxt->location != NULL) xmlFree(ctxt->location); - ctxt->location = xmlMemStrdup(cur); + if (*cur == '/') { + xmlChar *tmp_http = xmlStrdup ("http://"); + xmlChar *tmp_loc = xmlStrcat (tmp_http, BAD_CAST ctxt->hostname); + ctxt->location = (char *) xmlStrcat (tmp_loc, cur); + } else { + ctxt->location = xmlMemStrdup(cur); + } } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"WWW-Authenticate:", 17)) { cur += 17; while ((*cur == ' ') || (*cur == '\t')) cur++;