Arnulf Wiedemann wrote:
> Hi David,
>>It might take a few days, depending on how much time I have, but it
>>seems that it's something that will be useful for others. If you have
>>some C skills, it probably wouldn't be that hard to get started looking
>>at it... to be correct you'd want to modify apache_request.c to save the
>>data and then create a Tcl command to access it.
> in the last Mail I had the diff running on the wrong version (there were 2
> missing lines)
I've been looking at this some and created a patch of my own that's
checked into CVS... please check out and compile from there and see what
you think. The Tcl command is raw_post. The C code tries to be clever
in that it uses the existing infrastructure:
int ApacheRequest_parse_urlencoded(ApacheRequest *req)
{
request_rec *r = req->r;
int rc = OK;
if (r->method_number == M_POST) {
const char *data = NULL, *type;
type = ap_table_get(r->headers_in, "Content-Type");
if (!strncaseEQ(type, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH)) {
return DECLINED;
}
if ((rc = util_read(req, &data)) != OK) {
return rc;
}
if (data) {
req->raw_post = data; /* Give people a way of getting at the raw
data. */
split_to_parms(req, data);
}
}
return OK;
}
and just saves a pointer to the data which Tcl can fish out later.
In any case, let me know if that does the trick or not.
Ciao,
--
David N. Welton
- http://www.dedasys.com/davidw/
Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]