httpd-apreq-dev mailing list archives

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

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
content-Perl-handler).

Mybe this can help you.

Stephan


-----Urspr√ľngliche Nachricht-----
Von: Stas Bekman [mailto:stas@stason.org]
Gesendet: Dienstag, 28. Mai 2002 17:16
An: David N. Welton
Cc: apreq-dev@httpd.apache.org
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?
> 

http://perl.apache.org/release/docs/1.0/guide/snippets.html#Reusing_Data_from_POST_request


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message