[Catalyst-commits] r12599 - Catalyst-Runtime/5.80/branches/psgi/t/aggregate

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sun Jan 10 19:05:44 GMT 2010


Author: rafl
Date: 2010-01-10 19:05:43 +0000 (Sun, 10 Jan 2010)
New Revision: 12599

Modified:
   Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_headers.t
Log:
Stop expecting the Host header for proxy requests to be the original one.

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.

Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_headers.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_headers.t	2010-01-10 17:03:50 UTC (rev 12598)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_headers.t	2010-01-10 19:05:43 UTC (rev 12599)
@@ -45,7 +45,7 @@
 
     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:




More information about the Catalyst-commits mailing list