<div class="gmail_quote">On Mon, Apr 27, 2009 at 4:22 AM, Matt S Trout <span dir="ltr">&lt;<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>&gt;</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&#39;s more obvious to the people the guess is<br>
wrong for what&#39;s happening, or (b) we need (a) and some better guessing.<br>
Let&#39;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&#39;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&#39;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&#39;ll submit a patch ...<br><br>&gt;&gt;UPDATED DOCS<br><br> $req-&gt;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-&gt;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-&gt;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-&gt;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-&gt;secure should be valid. [END]<br>

</div></div><br>