httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pelikan Stephan" <>
Subject AW: raw post data
Date Wed, 29 May 2002 07:17:59 GMT

I used another approach: I patched 'apache_request.c' like this:

ApacheRequest *ApacheRequest_new(request_rec *r)
    ApacheRequest *req=0;
    char tmp[50];

    const char *ereq = ap_table_get(r->notes,
      "ApacheRequestAddress");                         // look whether there
    if ((sscanf(ereq, "%p", &req)) != EOF) return req; // is already a request
                                                       // an return it, if is so

    req = (ApacheRequest *) ap_pcalloc(r->pool,
      sizeof(ApacheRequest));                          // original lines
    req->status = OK;
    req->parsed = 0;
    req->r = r;

    sprintf(tmp, "%p", (void *) req);                  // if there was no
    ap_table_set(r->notes, "ApacheRequestAddress",
      tmp);                                            // request, store the
                                                       // current
    return req;

With this little trick I'm able to use posted data in multiple phases
of the request and no matter whether it's an C or Perl-module (I mixed
authentification/authorization/translate/fixup-C-handlers and a

Mybe this can help you.


-----Urspr√ľngliche Nachricht-----
Von: Stas Bekman []
Gesendet: Dienstag, 28. Mai 2002 17:16
An: David N. Welton
Betreff: Re: raw post data

David N. Welton wrote:
> Maybe I'm just too sleepy in the morning, but looking at
> ApacheRequest_parse_urlencoded
> I get the impression that raw POST data is not saved.  Any ideas about
> creating an accessor for it?

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message