autarch at urth
Jun 17, 2007, 11:55 AM
Post #1 of 2
Ok, I thought about my first patch and realized that adjusting for the
Proxy headers patch take two
proxy after the other prepare_* methods were called was kind of gross.
Unfortnuately, the only alternative I could see has its own grossness, in
that each engine must call $self->_proxy_info($c) in various methods in
order to account for a proxy.
The attached patch implements the proxy-related bits fully for the
Catalyst-Runtime distro and Catalyst-Engine-Apache.
It also partially implements this for the Zeus and SCGI engines.
There are some outstanding issues:
* SCGI and Zeus prepare_path() needs to be adjusted in a similar way to
C::E::CGI and C::E::Apache
* The POE server was not altered at all, because I don't understand it ;)
* Is C::E::Server still relevant? It doesn't seem like it, but it may need
updating if so.
* I really hate how the proxy info is cached in the Catalyst object by the
Engine object. This is really unclean, but it's a general problem with
* I also really hate how the path manipulation stuff is so grotty in
trying to handle doubled slashes.
I could imagine a different implementation that did something like provide
a per-engine RequestInfo class that could be used by Catalyst::Engine to
centralize the logic of the prepare_* methods. This RequestInfo class
would basically be an abstraction on top of CGI/ModPerl/Zeus/POE/whatever.
But I didn't want to go down that road unless there was a very clear
consensus on what that would look like, and whether it should happen at
Your guide to all that's veg. My book blog