<br><br><div><span class="gmail_quote">On 11/10/06, <b class="gmail_sendername">Jonathan Rockway</b> &lt;<a href="mailto:jon@jrock.us">jon@jrock.us</a>&gt; 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?&nbsp;&nbsp;We can't really test this until kd has his<br>lighty tests working properly.&nbsp;&nbsp;(Or are they working?)</blockquote><div><br><br>Dunno what you want the tests in Catalyst::Helper::FastCGI for in this context.&nbsp; all they do is check for non-identical behaviour between fcgi/lighttpd and the default server (apache to follow hopefully).&nbsp; OTOH there's nothing stopping people from adding more tests to it
<br>&nbsp;</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 &lt;<a href="mailto:adam@herzogdesigns.com">adam@herzogdesigns.com</a>&gt;<br>Reply-To: The elegant MVC web framework &lt;<a href="mailto:catalyst@lists.rawmode.org">
catalyst@lists.rawmode.org</a>&gt;<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&nbsp;&nbsp;(revision 5057)<br>+++ lib/Catalyst/Engine/CGI.pm&nbsp;&nbsp;(working copy)
<br>@@ -128,9 +128,10 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last PROXY_CHECK if $host !~ /localhost|127.0.0.1/;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last PROXY_CHECK if $c-&gt;config-&gt;{ignore_frontend_proxy};<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_HOST};
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last PROXY_CHECK<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$host = $ENV{HTTP_X_FORWARDED_HOST};<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$host = $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# backend could be on any port, so<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# 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)-&gt;config(name =&gt; do {
<br>$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,<br>&quot;;$;&quot;]-&gt;[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-&gt;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>