2009年11月14日星期六

Re: [fw-mvc] Chaining Hostname and REST Routes

bradley.holt wrote:
>
> What I meant to say was, "that statement evaluates to *true* thus
> returning *false*."
>
> On Sat, Nov 14, 2009 at 7:21 PM, Bradley Holt
> <bradley.holt@foundline.com> wrote:
>> I tracked down the problem code, but I don't know enough about how
>> it's supposed to work to suggest a fix. The problem is with the
>> following code in Zend_Controller_Router_Route_Chain:
>>
>>        if ($subPath !== '' && $subPath !== false) {
>>            return false;
>>        }
>>
>> My $subPath variable has the value "checkout/order/some-id" so that
>> statement evaluates to false, ignoring the correct values it got from
>> my routes. I'm going to poke around some more to see if I can
>> understand how it's supposed to work and suggest a patch or
>> workaround.
>>
>> On Sat, Nov 14, 2009 at 7:06 PM, Bradley Holt
>> <bradley.holt@foundline.com> wrote:
>>> Kyle,
>>>
>>> I've been doing some debugging as well and the only difference I've
>>> found so far is that with a plain old REST route the pathInfo looks
>>> like this:
>>>
>>> /checkout/order/some-id
>>>
>>> and when chained with a Hostname route it looks like this (I'm
>>> guessing the beginning slash is getting removed by the Hostname
>>> route):
>>>
>>> checkout/order/some-id
>>>
>>> However, from what I've seen so far this should not make any
>>> difference at all. I'll keep digging...
>>>
>>> On Sat, Nov 14, 2009 at 7:00 PM, Kyle Spraggs <theman@spiffyjr.me>
>>> wrote:
>>>>
>>>> I literally just sent a message out pertaining to this exact thing. I'm
>>>> unable to get it working and I've tried tracing the steps but I'm not
>>>> on my
>>>> home system with the Zend Server so debugging is less than ideal at the
>>>> moment.
>>>>
>>>> Perhaps someone "in the know" will step up to the plate and answer our
>>>> questions.
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Chaining-Hostname-and-REST-Routes-tp26354930p26355129.html
>>>> Sent from the Zend MVC mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>> --
>>> Bradley Holt
>>> bradley.holt@foundline.com
>>>
>>
>>
>>
>> --
>> Bradley Holt
>> bradley.holt@foundline.com
>>
>
>
>
> --
> Bradley Holt
> bradley.holt@foundline.com
>
>

I recently found the same thing and I'm unsure of a fix at this point. I can
verify that each route is returning the proper module, controller, and array
but breaks after chaining.

--
View this message in context: http://old.nabble.com/Chaining-Hostname-and-REST-Routes-tp26354930p26355316.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: