<div class="gmail_quote">On Mon, Apr 27, 2009 at 4:22 AM, Matt S Trout <span dir="ltr"><<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think either (a) we need more documentation explaining exactly how it<br>
makes its best guess so that it's more obvious to the people the guess is<br>
wrong for what's happening, or (b) we need (a) and some better guessing.<br>
Let's keep discussing how it could/should have guessed for your setup to<br>
find out which :)</blockquote><div><br>For (b), I really don't know what could have been done for my setup -- non-standard port and (apparently) no env variable being set for HTTPS. Fyi, the reason for the non-standard port is that I'm running both a dev and a prod system on the same box using virtual hosts. <br>
</div><div><br>For (a) documentation, I took a stab at writing some. If this looks okay, I'll submit a patch ...<br><br>>>UPDATED DOCS<br><br> $req->base<br><br>Contains the URI base. This will always have a trailing slash. [ADDED:] Note that the URI scheme (eg., http vs. https) must be determined through heuristics; depending on your server configuration, it may be incorrect. See $req->secure for more info.[END]<br>
<br>If your application was queried with the URI <a href="http://localhost:3000/some/path">http://localhost:3000/some/path</a> then base is <a href="http://localhost:3000/">http://localhost:3000/</a>.<br><br> $req->secure<br>
<br>Returns true or false, indicating whether the connection is secure (https). [ADDED] Note that the URI scheme (eg., http vs. https) must be determined through heuristics, and therefore the reliablity 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. [END]<br>
</div></div><br>