On Mon, Apr 27, 2009 at 4:22 AM, Matt S Trout <dbix-cl...@trout.me.uk>wrote:
> I think either (a) we need more documentation explaining exactly how it > makes its best guess so that it's more obvious to the people the guess is > wrong for what's happening, or (b) we need (a) and some better guessing. > Let's keep discussing how it could/should have guessed for your setup to > find out which :) 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. For (a) documentation, I took a stab at writing some. If this looks okay, I'll submit a patch ... >>UPDATED DOCS $req->base 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] If your application was queried with the URI http://localhost:3000/some/paththen base is http://localhost:3000/. $req->secure 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]
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/