You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Alexander Farber <al...@gmail.com> on 2007/10/18 00:24:47 UTC
Ap1: should I call for my GET-handling module?
Hello,
I'm developing an Apache 1.3.x module which
is supposed to process GET and POST requests:
if (M_GET == r->method_number) {
if ((rc = ap_discard_request_body(r)) != OK)
return rc;
if (NULL == r->args)
return DECLINED;
if ((rc = prepare_req(r, r->args, &args, &req)) != OK)
return rc;
} else if (M_POST == r->method_number) {
type = ap_table_get(r->headers_in, "Content-Type");
if (strcasecmp(type, DEFAULT_ENCTYPE) != 0)
return DECLINED;
if ((rc = util_read(r, &data)) != OK)
return rc;
if (NULL == data)
return DECLINED;
if ((rc = prepare_req(r, data, &args, &req)) != OK)
return rc;
} else
return DECLINED;
(The prepare_req is my own function extracting
few parameters. The util_read is from the Eagle book).
I wonder if the ap_discard_request_body(r) call above
is needed at all or is that function called by Apache
anyway after my custom module is done?
I've found 3 spots in the Apache source code where
the ap_discard_request_body(r) is called, but I'm not
sure, on what occasions exactly.
Thank you
Alex
--
http://preferans.de
Re: Ap1: should I call for my GET-handling module?
Posted by Alexander Farber <al...@gmail.com>.
Whoops too late for this here in Germany, sorry.
I meant the subject to be:
Ap1: should I call ap_discard_request_body()
for my GET-handling module?