RE: [xml] Bug in uri.c

Date view Thread view Subject view Author view

From: Marc Sanfacon (sanm@copernic.com)
Date: Tue Aug 22 2000 - 17:02:46 EDT


Bonjour Daniel

> Humm, trouble is that
>
> xmlBuildURI("http://news.gnome.org", "");
> should return
> "http://news.gnome.org"
> and not
> "http://news.gnome.org/"
>
>(okay it's a bit pedantic ...). Plus the test to be sure the last
>fragment ends up with a / should be ref->path[out] != '/'
>
>So I will rather use
> if (res->path[0] != '/' && res->path[0] != 0 &&
> ref->path[out] != '/') {
> res->path[out++] = '/';
> }

I guess the test should be:

  if (res->path[0] != '/' && ref->path[0] != 0 &&
      ref->path[out] != '/') {
      res->path[out++] = '/';
  }

Notice that the second condition is 'ref->path[0]' and not res->path[0].

Thank you.

Marc.

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 22 2000 - 14:43:12 EDT