In article <20030410130228.12299.qmail@onion.perl.org>, rob@dixon.nildram.co.uk (Rob Dixon) writes: >Hi all. > >Can somebody suggest how I might resolve the following? > >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/ Strange sort of URLs you have there. Mine have two / and one :, not the other way around. If http://foo.com/path is a directory, the server generally sends back a 302 redirect to http://foo.com/path/ or http://foo.com/path/index.html or the like. So either do a simple_request or check the redirect chain in the response. Of course, the server is free to play with your head if it wants to. -- Peter Scott http://www.perldebugged.com