httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: How to achieve zero-copy when reading request headers?
Date Mon, 01 Jul 2002 05:38:15 GMT
On Sun, 2002-06-30 at 22:04, Justin Erenkrantz wrote:

> > +0.  If we create the temp brigade in ap_get_mime_headers(), we'll
> > still be doing the brigade creation/deletion for the first line of
> > the request.  We really need to create the temp brigade in
> > ap_read_request(), and then pass it through a variant of
> > ap_get_mime_headers() that takes the temp brigade as an input.
> That'd be far better than adding a brigade to request_rec.  I'm
> guessing you are okay with adding a brigade parameter to
> ap_rgetline?  (It's defined as an optimal interface to ap_getline,
> so it seems okay to me to change its API.)  -- justin

Okay with me.  That would also be a step toward the next potential
optimization: eliminating the speculative read.  Instead of calling
ap_rgetline_core() in folding mode in ap_get_mime_headers(), we
could instead do the folding in ap_get_mime_headers() itself.  This
would just require ap_get_mime_headers() hold onto each retrieved
line until the next iteration of its loop through the header: if
the next line starts with tab, append it to the saved line, else
parse the saved line and store it in r->headers_in.


View raw message