[xml] nanohttp: No redirects for http://www.domain.com
- From: Ralf Junker <ralfjunker gmx de>
- To: xml gnome org
- Subject: [xml] nanohttp: No redirects for http://www.domain.com
- Date: Fri, 02 Oct 2009 11:34:28 +0200
In the latest libXml 2.7.5, nanohttp no longer redirect URLs with an empty path (no terminal '/') like this:
http://www.domain.com
http://www.google.com
Compared to previous versions, I observed that in nanohttp.c, the following code does no longer trigger
because uri->path is not NULL but contains an empty string:
if (uri->path != NULL)
ctxt->path = xmlMemStrdup(uri->path);
else
ctxt->path = xmlMemStrdup("/");
I am not sure which change causes the problem, but since nanohttp.c has not changed in this regard I believe
that the problem is in uri.c, which has changed a lot since the update to RFC 3986.
In particular, the uri.c function xmlParse3986PathAbEmpty() copies an empty string to uri->path in:
uri->path = STRNDUP(*str, cur - *str);
Similar code is scattered in different places.
Is this intentional?
Ralf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]