From: Jesse Date: Thu, 16 May 2013 16:14:55 +0000 (-0400) Subject: Updated docs for $req->secure to reflect what modern Cat does X-Git-Tag: 5.90040~3^2~14^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=d7f189232be6991bad0861a3d847d224475677df Updated docs for $req->secure to reflect what modern Cat does --- diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index b8d05b4..dce7a05 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -640,7 +640,7 @@ defaults to the size of the request if not specified. =head2 $req->read_chunk(\$buff, $max) -Reads a chunk.. +Reads a chunk. You have to set MyApp->config(parse_on_demand => 1) to use this directly. @@ -651,10 +651,12 @@ Shortcut for $req->headers->referer. Returns the referring page. =head2 $req->secure Returns true or false, indicating whether the connection is secure -(https). Note that the URI scheme (e.g., http vs. https) must be determined -through heuristics, and therefore the reliability of $req->secure will depend -on your server configuration. If you are setting the HTTPS environment variable, -$req->secure should be valid. +(https). The reliability of $req->secure may depend on your server +configuration; Catalyst relies on PSGI to determine whether or not a +request is secure (Catalyst looks at psgi.url_scheme), and different +PSGI servers may make this determination in different ways (as by +directly passing along information from the server, interpreting any of +several HTTP headers, or using heuristics of their own). =head2 $req->captures