[Catalyst] Making proxy requests cooperate with uri_for

J. Shirley jshirley at gmail.com
Thu Nov 13 18:37:43 GMT 2008


On Thu, Nov 13, 2008 at 10:13 AM, Andy Grundman <andy at hybridized.org> wrote:
>
> On Nov 13, 2008, at 1:06 PM, Dave Rolsky wrote:
>
>> On Thu, 13 Nov 2008, Matt S Trout wrote:
>>
>>> On Mon, Oct 20, 2008 at 12:23:38PM -0700, Ashley wrote:
>>>>
>>>> This might be a simple question but I've never had to do it before,
>>>> Googling for it is difficult, and none of the main docs seems to have
>>>> the info.
>>>>
>>>> I want to run myapp_server.pl script as a proxy as if it were from a
>>>> dir.
>>>>
>>>> This is easily accomplished with
>>>>
>>>>   ProxyPass /from_dir http://localhost:8080/
>>>>   ProxyPassReverse /from_dir http://localhost:8080/
>>>>
>>>> The problem then is $c->uri_for("/") returns http://localhost/ when
>>>> http://localhost/from_dir is what is really needed.
>>>
>>> Dave Rolsky (autarch) had a proxystuff branch that handled this at one
>>> point, but I'm unsure what happened to it.
>>
>> Nor am I ;)
>>
>> There was talk of someone (not me) writing more Engine tests before it was
>> merged, but I don't think that ever happened. FWIW, I did write tests for
>> the bits I changed, IIRC.
>
> I believe the current plan is to merge it in for 5.8 and make sure it works
> with all the engines.  I don't remember who volunteered to do this. :)
>

I can do the merge.  As far as working with all the engines I wouldn't
trust myself outside of simply running the existing tests.  Both Andy
G and Dave did a good job with their tests, but some of the other
engines don't have as much test coverage.

So, the question I still have is how do you make sure it works with
the other engines?

-J



More information about the Catalyst mailing list