<br><br><div><span class="gmail_quote">On 11/10/06, <b class="gmail_sendername">Jonathan Rockway</b> <<a href="mailto:jon@jrock.us">jon@jrock.us</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Can anyone confirm this? We can't really test this until kd has his<br>lighty tests working properly. (Or are they working?)</blockquote><div><br><br>Dunno what you want the tests in Catalyst::Helper::FastCGI for in this context. all they do is check for non-identical behaviour between fcgi/lighttpd and the default server (apache to follow hopefully). OTOH there's nothing stopping people from adding more tests to it
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-------- Original Message --------<br>Subject: [Catalyst] Lighttpd Proxy Support
<br>Date: Mon, 9 Oct 2006 18:23:19 -0400<br>From: Adam Herzog <<a href="mailto:adam@herzogdesigns.com">adam@herzogdesigns.com</a>><br>Reply-To: The elegant MVC web framework <<a href="mailto:catalyst@lists.rawmode.org">
catalyst@lists.rawmode.org</a>><br>To: <a href="mailto:catalyst@lists.rawmode.org">catalyst@lists.rawmode.org</a><br><br>I ran into a small problem when using Lighttpd to proxy to my Cat app<br>(running under Apache/mod_fastcgi).
<br><br>Catalyst's proxy support uses the X-Forwarded-For and X-Forwarded-<br>Host headers to set the appropriate information about the request.<br>Unfortunately, Lighttpd doesn't send X-Forwarded-Host; instead it<br>sends X-Host. Lighttpd has had a ticket open asking to have X-
<br>Forwarded-Host added for quite a while now, so I'm not too hopeful<br>that it'll get added any time soon.<br><br>So, does it make sense to have Cat check for either of these headers?<br>I've included a small patch which adds that support, assuming it's
<br>sane to do so...<br><br>Thanks,<br>-A<br><br>Index: lib/Catalyst/Engine/CGI.pm<br>===================================================================<br>--- lib/Catalyst/Engine/CGI.pm (revision 5057)<br>+++ lib/Catalyst/Engine/CGI.pm (working copy)
<br>@@ -128,9 +128,10 @@<br> last PROXY_CHECK if $host !~ /localhost|127.0.0.1/;<br> last PROXY_CHECK if $c->config->{ignore_frontend_proxy};<br> }<br>- last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_HOST};
<br>+ last PROXY_CHECK<br>+ unless $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};<br>- $host = $ENV{HTTP_X_FORWARDED_HOST};<br>+ $host = $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};
<br> # backend could be on any port, so<br> # assume frontend is on the default port<br><br><br><br>_______________________________________________<br>List: <a href="mailto:Catalyst@lists.rawmode.org">Catalyst@lists.rawmode.org
</a><br>Listinfo: <a href="http://lists.rawmode.org/mailman/listinfo/catalyst">http://lists.rawmode.org/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.rawmode.org/">
http://www.mail-archive.com/catalyst@lists.rawmode.org/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a><br><br>--<br>package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
<br>$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,<br>";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;<br><br>_______________________________________________<br>Catalyst-dev mailing list
<br><a href="mailto:Catalyst-dev@lists.rawmode.org">Catalyst-dev@lists.rawmode.org</a><br><a href="http://lists.rawmode.org/mailman/listinfo/catalyst-dev">http://lists.rawmode.org/mailman/listinfo/catalyst-dev</a><br></blockquote>
</div><br>