Double-check on path in URL
Martijn Koster (m.koster@nexor.co.uk)
Tue, 20 Jun 1995 20:43:28 +0100
Roy,
I've found another border case in URL.pm. Can you confirm the following
test cases show desired behaviour?
$url = new URI::URL 'http://web/a';
$url->_expect('path', 'a');
$url = new URI::URL 'http://web/';
$url->_expect('path', '');
$url = new URI::URL 'http://web';
$url->_expect('path', '');
These tests currently fail. I can fix this, but it will probably brake
some people's stuff, so I want to be quite sure before I do it. I base
the test cases on:
# RFC 1738 says:
#
# Note that the "/" between the host (or port) and the
# url-path is NOT part of the url-path.
#
# This may be breaking many lazy HTTP clients that do a GET
# for the path, without using prepending the slash that
# HTTP servers expect, if required.
I expect I can make the full_path method add the slash if required,
seeing as 'full_path' as a concept isn't from any of the RFC's, and
specically designed to return what is required in a GET.
Comments?
-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
X-500: c=GB@o=NEXOR Ltd@cn=Martijn Koster
WWW: http://web.nexor.co.uk/mak/mak.html