[Catalyst] $c->request->uri returning 'wrong' results?
Jon Warbrick
jw35 at cam.ac.uk
Thu Oct 12 11:00:10 CEST 2006
When responding to a request for, e.g.
http://www.example.com/?foo=bar,
$c->request->uri returns
http://www.example.com?foo=bar
(at least under the the Testserver and Catalyst 5.7001). I _think_ this is
technically wrong, on the grounds that the path component of an HTTP URL
is required to be at least '/' even if there is a query component.
In practise browsers and servers seem to be able to cope with this. I
noticed it in an application that compared a URL before and after the
addition of a query string and which concluded that they were not related
becasue http://www.example.com/ != http://www.example.com
It looks as if this may at least partly be down to the inner workings of
URI::canonical.
Jon.
--
Jon Warbrick
Web/News Development, Computing Service, University of Cambridge
More information about the Catalyst
mailing list