httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: storing original POST input
Date Sat, 31 May 2003 03:35:32 GMT (David N. Welton) writes:

> My thoughts on the API:
> int ApacheRequest_set_save_post_data(request_rec *r, int flag);
> char *ApacheRequest_fetch_post_data(request_rec *r);
> So one would do something like this:
>     errstatus = ApacheRequest_set_save_post_data(apachereq, 1);
>     ...
>     errstatus = ApacheRequest_parse(apachereq);
> That would avoid any API changes.  Of course, it could also be a flag
> to _new or _parse.

Personally I don't want to have _new or _parse augmented
for this sort of thing, but adding the extra functions is 
a possibility.

> It would work like this: util_read saves 'rbuf' to a field of the
> request_rec struct.

For www-urlencoded data, that's probably workable...

> Not quite sure about multipart, yet.  Maybe do the same thing, more or
> less, but using 'mbuff'?

but multipart/form-data is always a PITA (binary data w/embedded 
nul-characters, large file uploads, etc).  IMO whatever effort
you put into handling this situation would probably be better spent
on apreq-2, since this functionality is absolutely *critical* there.

The payoff is larger also, since with apreq-2
  1) mod_apreq already has this feature.

  2) an external CGI script can also use libapreq_cgi for parsing.

  3) Once libapr-1.0 is released, libapreq will be portable
     to other webserver platforms besides httpd-2 (apache-1.3,
     TuX, IIS, etc.).

Joe Schaefer

View raw message