httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eli Marmor <mar...@netmask.it>
Subject Re: cvs tagged as v1_1 (was Re: 1.1_rc4)
Date Mon, 13 Jan 2003 09:36:14 GMT
Issac Goldstand wrote:

> Eli,
>   Could you elaborate a bit on exactly what you would consider to be
> high-level and what low-level?  Are you trying to say that we could make
> low-level parsers which could, for example, be plugged into an SMTP module
> for Apache to look at MIME encoded messages using the same "low-level" code
> as HTTP's multipart forms?  I hope I'm on the right track here, and if so, I
> like the idea.  But could you think of a good list of items to be put in the
> high-level and a list for the low-level?

I don't have an existing list, but the following example may clear my
idea:

Let's take apreq_request_new (I use the terminology of apreq-2):

The only justification of requiring the request_rec is the pool.
So we can move the code of the function to a sub-function (called
"apr_request_new") and leave only the following in the original
function:

apreq_request_t *apreq_request_new(request_rec *r)
{
    return apr_request_new(r->pool);
}

(some of the fields of request_rec, like args and the headers, will
have to be passed by the higher level functions to the lower level
ones, or - alternatively - to be added to apreq_request_t).

Of course, this is a simple example. Sometimes, it may be trickier.

Especially in cases like multipart POSTs, where the parsing and
handling is needed in APR (i.e. CGI, FastCGI, etc.), but the reading
of the block (or - more precisely - reading from the input filter) -
should be left to the higher level.

But it is still easier than the effort of porting to Apache-2; Contrary
to THAT effort, most of the work here is copy-paste...

-- 
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel

Mime
View raw message