W3C home > Mailing lists > Public > www-archive@w3.org > June 2006

Patch for uripath.py

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Wed, 14 Jun 2006 14:41:55 +0200
To: connolly@w3.org
Cc: www-archive@w3.org
Message-Id: <1150288915.9866.27.camel@cumulustier>
Hi Dan,

I noticed that the refTo function in uripath.py [1] would return "/x"
when asked the path between "http://example/" and "http://example/x",
while "x" would be a shorter and possibly more useful answer.

Although refTo doesn't say whether it return preferentially absolute or
relative path, (and seems to be doing a bit of two), having it reply
with "x" in this case proves useful to determine that
http://example/#foo doesn't require a new request if you have already
requested http://example/#foo.

The patch attached makes the code behave that way, contains test case,
and passes the existing tests. Is it OK to commit?

Dom

1. http://dev.w3.org/cvsweb/2000/10/swap/uripath.py




Received on Wednesday, 14 June 2006 12:44:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:43:02 UTC