[Jifty-commit] r2134 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Nov 12 02:56:03 EST 2006
Author: gaal
Date: Sun Nov 12 02:56:03 2006
New Revision: 2134
Modified:
jifty/trunk/lib/Jifty/Web.pm
Log:
when inferring a scheme for the application, look at REQUEST_URI
instead of assuming http://. Fixes tangent() on non-http:// apps.
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Sun Nov 12 02:56:03 2006
@@ -127,10 +127,12 @@
my $uri;
if ($ENV{'HTTP_HOST'}) {
my $host = $ENV{HTTP_HOST};
- if ($host !~ m{^http://}) {
- $host = 'http://' . $host;
- }
$uri = URI->new($host);
+ if (! $uri->schema) {
+ my $envuri = URI->new($ENV{REQUEST_URI});
+ $self->log->warn("cannot deduce application scheme") unless $envuri->scheme;
+ $uri->scheme( $envuri->scheme );
+ }
} else {
my $url = Jifty->config->framework("Web")->{BaseURL};
my $port = Jifty->config->framework("Web")->{Port};
More information about the Jifty-commit
mailing list