[Catalyst-dev] [Fwd: [Catalyst] Lighttpd Proxy Support]

Kieren Diment diment at gmail.com
Sat Oct 14 14:20:51 CEST 2006


On 11/10/06, Jonathan Rockway <jon at jrock.us> wrote:
>
> Can anyone confirm this?  We can't really test this until kd has his
> lighty tests working properly.  (Or are they working?)



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


-------- Original Message --------
> Subject: [Catalyst] Lighttpd Proxy Support
> Date: Mon, 9 Oct 2006 18:23:19 -0400
> From: Adam Herzog <adam at herzogdesigns.com>
> Reply-To: The elegant MVC web framework <catalyst at lists.rawmode.org>
> To: catalyst at lists.rawmode.org
>
> I ran into a small problem when using Lighttpd to proxy to my Cat app
> (running under Apache/mod_fastcgi).
>
> Catalyst's proxy support uses the X-Forwarded-For and X-Forwarded-
> Host headers to set the appropriate information about the request.
> Unfortunately, Lighttpd doesn't send X-Forwarded-Host; instead it
> sends X-Host. Lighttpd has had a ticket open asking to have X-
> Forwarded-Host added for quite a while now, so I'm not too hopeful
> that it'll get added any time soon.
>
> So, does it make sense to have Cat check for either of these headers?
> I've included a small patch which adds that support, assuming it's
> sane to do so...
>
> Thanks,
> -A
>
> Index: lib/Catalyst/Engine/CGI.pm
> =================================> --- lib/Catalyst/Engine/CGI.pm  (revision 5057)
> +++ lib/Catalyst/Engine/CGI.pm  (working copy)
> @@ -128,9 +128,10 @@
>               last PROXY_CHECK if $host !~ /localhost|127.0.0.1/;
>               last PROXY_CHECK if $c->config->{ignore_frontend_proxy};
>           }
> -        last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_HOST};
> +        last PROXY_CHECK
> +            unless $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};
> -        $host > +        $host >           # backend could be on any port, so
>           # assume frontend is on the default port
>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
> --
> package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
> $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
> ";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst-dev/attachments/20061014/68e27894/attachment.htm 


More information about the Catalyst-dev mailing list