[Bps-public-commit] r11819 - Test-OpenID-Server/lib/Test/OpenID

clkao at bestpractical.com clkao at bestpractical.com
Tue Apr 22 11:27:46 EDT 2008


Author: clkao
Date: Tue Apr 22 11:27:45 2008
New Revision: 11819

Modified:
   Test-OpenID-Server/lib/Test/OpenID/Server.pm

Log:
use HTTP_HOST so the test server can be by non-localhost.


Modified: Test-OpenID-Server/lib/Test/OpenID/Server.pm
==============================================================================
--- Test-OpenID-Server/lib/Test/OpenID/Server.pm	(original)
+++ Test-OpenID-Server/lib/Test/OpenID/Server.pm	Tue Apr 22 11:27:45 2008
@@ -90,7 +90,7 @@
 sub _identity_url {
     my $self = shift;
     my $id   = shift;
-    return "http://localhost:@{[$self->port]}/$id";
+    return "http://$ENV{HTTP_HOST}/$id";
 }
 
 #=head2 modify_trust NAME, URL, BOOLEAN
@@ -150,7 +150,7 @@
             print <<"            END";
 <html>
   <head>
-    <link rel="openid.server" href="$ENV{'SERVER_URL'}openid.server" />
+    <link rel="openid.server" href="http://$ENV{'HTTP_HOST'}/openid.server" />
   </head>
   <body>
     <p>OpenID identity page for $id.</p>



More information about the Bps-public-commit mailing list