I've seen a number of code examples for redirects which output a
root-relative URI in the Location header. Eg:

  Location: /images/item1.gif


Although browsers seem to accept this and do 'the right thing', the 
HTTP RFC seems to be pretty clear that the Location header must be 
an absolute URI.  Am I reading it wrong?

Is there an easy way to get the absolute URI of the current request 
to use with Apache::URI->parse to translate a relative URI to 
absolute? 

I have managed to get the hostname, port number and path components
individually from the request object and paste them together but 
it's all a bit messy.

Regards
Grant

Reply via email to