X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=c058daa0ab2b3ca4f4812bc24b3fd49c0b21b89a;hb=7cd05fd23b8593ff14e73c068817f5fa62ce698a;hp=ab5c0daeb42599c0081ab9002dd6c24a14bca003;hpb=704a21721f804db00c2861f7fcebff0aaeb81a00;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index ab5c0da..c058daa 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -120,7 +120,7 @@ has hostname => ( lazy => 1, default => sub { my ($self) = @_; - gethostbyaddr( inet_aton( $self->address ), AF_INET ) || 'localhost' + gethostbyaddr( inet_aton( $self->address ), AF_INET ) || $self->address }, ); @@ -427,6 +427,10 @@ Shortcut for $req->parameters. Returns the path, i.e. the part of the URI after $req->base, for the current request. + http://localhost/path/foo + + $c->request->path will contain 'path/foo' + =head2 $req->path_info Alias for path, added for compatibility with L. @@ -484,7 +488,7 @@ Shortcut for $req->headers->referer. Returns the referring page. Returns true or false, indicating whether the connection is secure (https). Note that the URI scheme (eg., http vs. https) must be determined -through heuristics, and therefore the reliablity of $req->secure will depend +through heuristics, and therefore the reliability of $req->secure will depend on your server configuration. If you are serving secure pages on the standard SSL port (443) and/or setting the HTTPS environment variable, $req->secure should be valid.