- Timestamp:
- 08/17/08 02:48:07 (5 years ago)
- Location:
- lang/perl/HTTP-Engine/trunk
- Files:
-
- 3 modified
-
lib/HTTP/Engine/Interface/POE.pm (modified) (1 diff)
-
lib/HTTP/Engine/Interface/Standalone.pm (modified) (1 diff)
-
t/030_daemonize/uri.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Interface/POE.pm
r17715 r17742 65 65 my $host = $request->header('Host'); 66 66 my $uri = $request->uri; 67 $uri->scheme('http') unless $uri->scheme; 68 $uri->host($self->host) unless $uri->host; 69 $uri->port($self->port) unless $uri->port; 70 $uri->host_port($host) unless !$host || ( $host eq $uri->host_port ); 67 $uri->scheme('http'); 68 $uri->host($self->host); 69 $uri->port($self->port); 71 70 72 71 $self->handle_request( 73 72 request_args => { 74 73 headers => $request->headers, 75 uri => URI::WithBase->new($uri), 74 uri => URI::WithBase->new($uri, do { 75 my $u = $uri->clone; 76 $u->path_query('/'); 77 $u; 78 }), 76 79 connection_info => { 77 80 address => $heap->{remote_ip}, -
lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Interface/Standalone.pm
r17718 r17742 167 167 uri => URI::WithBase->new( 168 168 do { 169 ;170 169 my $u = URI->new($uri); 171 170 $u->scheme('http'); 172 171 $u->host($headers->header('Host') || $self->host); 173 172 $u->port($self->port); 174 $u; 175 } 173 my $b = $u->clone; 174 $b->path_query('/'); 175 ($u, $b); 176 }, 176 177 ), 177 178 headers => $headers, -
lang/perl/HTTP-Engine/trunk/t/030_daemonize/uri.t
r17714 r17742 15 15 wait_port $port; 16 16 my $ua = LWP::UserAgent->new(timeout => 10); 17 my $res = $ua->get("http://localhost:$port/ ", 'Foo' => 'Bar');17 my $res = $ua->get("http://localhost:$port/foobar?foo=bar"); 18 18 is $res->code, 200; 19 like $res->content, qr{http:// localhost:\d+/};19 like $res->content, qr{http://(?:localhost|\Q127.0.0.1\E):\d+/foobar\?foo=bar, http://(?:localhost|\Q127.0.0.1\E):\d+/, /foobar}; 20 20 } => ( 21 21 poe_kernel_run => 1, … … 28 28 HTTP::Engine::Response->new( 29 29 status => 200, 30 body => join(', ', $req->uri ),30 body => join(', ', $req->uri, $req->base, $req->path), 31 31 ); 32 32 },
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)