Stop expecting the Host header for proxy requests to be the original one.
Florian Ragwitz [Sun, 10 Jan 2010 19:05:43 +0000 (19:05 +0000)]
Doing this was probably stupid in the first place, and now we're handing all
the frontend proxy stuff off to plack, we shouldn't even care anymore. The
middleware is free to set HTTP_HOST to HTTP_X_FORWARDED_HOST for us.

t/aggregate/live_engine_request_headers.t

index 0e1c929..4e4ab74 100644 (file)
@@ -45,7 +45,7 @@ use HTTP::Request::Common;
 
     is( $creq->header('User-Agent'), $request->header('User-Agent'), 'Catalyst::Request->header User-Agent' );
 
-    my $host = sprintf( '%s:%d', $request->uri->host, $request->uri->port );
+    my $host = sprintf( '%s:%d', $request->header('X-Forwarded-Host'), $request->header('X-Forwarded-Port') );
     is( $creq->header('Host'), $host, 'Catalyst::Request->header Host' );
 
     SKIP: