Hi Bryan,

On Fri, Feb 25, 2011 at 11:40:00PM -0800, Bryan Talbot wrote:
> Maybe this is the problem?  Line 548 of backend.c from 1.4.11:
> 
> 
>                               if (s->txn.meth == HTTP_METH_POST &&
>                                   memchr(s->txn.req.sol + s->txn.req.sl.rq.u, 
> '&',
>                                          s->txn.req.sl.rq.u_l ) == NULL)
>                                       s->srv = get_server_ph_post(s);
>                               else
>                                       s->srv = get_server_ph(s->be,
>                                                              s->txn.req.sol + 
> s->txn.req.sl.rq.u,
>                                                              
> s->txn.req.sl.rq.u_l);
> 
> 
> It looks to me like when the method is a POST, that the url is
> searched for a '&' character and if it's not found then the post body
> might be checked.  Of course, it's quite likely that there is just one
> query string parameter so the uri would not contain a '&'.  I believe
> this should check for the existence of a '?' instead.
> 
> If this is the case, then I think there is a documentation bug as well
> since the first line for url_param claims it only works for GET.

I agree with all your points. Looks like this needs fixing. Fortunately
I have not released 1.4.12 yet ;-)

And yes, the reference to GET in the doc really meant "everything but POST".
I think we could improve that to look for the URI first, then switch to the
body if there is a content-length or transfer-encoding. That would be a lot
cleaner and would not rely anymore on the method.

Regards,
Willy


Reply via email to