httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Winstead <>
Subject Re: Hairy code...
Date Tue, 12 Dec 2000 22:35:47 GMT
On Dec 12, David N. Welton wrote:
> 1) I really would like to be able to take a few files and use them
>    directly in mod_dtcl, so that I don't have to link against this as
>    a library, or cut and paste code.
> This is currently problematic because apache_request.c contains a lot
> of the code that actually parses up multipart/form-data.

interface suggestions are welcome. apache_request.c is supposed to
define the current interface. all you should need is apache_request.*
and multipart_buffer.*.

> 2) In my original multipart code, I did one of two things with
>    incoming data: A) wrote it out to a file and then handed the user
>    the filename, or B) put it directly into a Tcl variable, depending
>    on a configuration directive.  I would like the flexibility to be
>    able to do something similiar.

i think some sort of callback mechanism for handling the file
uploads (and variables?) would be reasonable. how does that sound?

> And of course I need access to the regular variables passed via
> multipart/form-data so that I may do Tclish things with them.

those are in stored in a table in apreq->parms after ApacheRequest_parse
is called, so you can call ap_table_get(apreq->params, "varname")
to get the value. you can also use ap_table_do to walk the table.
for the perl interface, we simply tie the table to a perl hash.
you can also use ApacheRequest_params and ApacheRequest_param to
get at the same things.

i hope to have the code in cvs soon so we can all be talking about
the same version of the code. it has gotten quite a bit cleaner
since libapreq-0.31, and joe has an angle on making some of it even


View raw message