Re: [xml] nanohttp: No redirects for

I could narrow the problem down to the fact that uri.c has indeed changed in an incompatible way. Consider 

  uri = xmlParseURIRaw('', 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.


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:

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);
       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]