develooper Front page | perl.fwp | Postings from April 2003

Re: Resolving unterminated URL paths

Thread Previous | Thread Next
From:
sthoenna
Date:
April 10, 2003 16:27
Subject:
Re: Resolving unterminated URL paths
Message ID:
anfl+gzkgWZA092yn@efn.org
On Thu, 10 Apr 2003 14:02:26 +0100, rob@dixon.nildram.co.uk wrote:
>Hi all.
>
>If I make a GET request to a server with a URL like
>
>    http::/ww.domain.com/path/path/name
>
>how can I determine whether what is passed back is actually
>this path (i.e. 'name' is a resource) or if what I am getting is
>really
>
>    http::/ww.domain.com/path/path/name/default.htm
>
>or the equivalent?
>
>The reason I ask is that this clearly has a bearing on relative
>links within the data returned. Are they relative to
>
>    http::/ww.domain.com/path/path/name/
>or to
>    http::/ww.domain.com/path/path/

If name is a directory, a request for .../path/name gets redirected
to .../path/name/ (with a trailing slash) so that links are relative
to within the directory.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About