Re: [xml] nanohttp: No redirects for http://www.domain.com
- From: Ralf Junker <ralfjunker gmx de>
- To: xml gnome org
- Subject: Re: [xml] nanohttp: No redirects for http://www.domain.com
- Date: Fri, 02 Oct 2009 12:18:19 +0200
I could narrow the problem down to the fact that uri.c has indeed changed in an incompatible way. Consider
this:
uri = xmlParseURIRaw('http://www.google.com', 0);
After the call, in 2.7.5 uri->path contains an empty string. In previous versions it contained NULL, just
like the other "empty" pieces.
I believe that this a bug in uri.c. It clearly results in the problem described in my initial message.
Ralf
At 11:34 02.10.2009, Ralf Junker wrote:
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?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]