httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Re: POST handlers
Date Fri, 27 Oct 2000 15:59:40 GMT

> On Fri, 27 Oct 2000, Rasmus Lerdorf wrote:
>
> > > /*
> > >  * Default handler for MIME types without other handlers.  Only GET
> > >  * and OPTIONS at this point... anyone who wants to write a generic
> > >  * handler for PUT or POST is free to do so, but it seems unwise to
provide
> > >  * any defaults yet... So, for now, we assume that this will always be
> > >  * the last handler called and return 405 or 501.
> > >  */
> > >
> > >     is it right that in order to read POST data, PHP would need
> > >     to install its own handler for doing so? Or is there any
> > >     other way to let the PHP filter access the POST data of a
> > >     request?
> >
> > As far as I am concerned the ap_setup_client_block(),
> > ap_should_client_block() and ap_get_client_block() should work in
> > Apache-2.0 the same way it did in 1.3.
>
>     The problem is that the default handler as said before does
>     NOT handle POST requests. So, whatever we could do later down
>     the road, unless we install a custom handler, the result will
>     be a 405 response.
>
>     The default_handler currently does this:
>
>     if (r->method_number != M_GET) {
>         return HTTP_METHOD_NOT_ALLOWED;
>     }
>

PHP needs to be a handler and not a pure filter, which is what using
ap_*_client_block() sort of implies. If the PHP filter/handler gets control,
the default handler should never see the request.

Bill



Mime
View raw message