You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/02/18 09:21:09 UTC

Re: lingering_close and performance

>Also, earlier I said I'd work on a generalized way to avoid multiple calls
>to mod_browser's parse_headers_browser_module -- I believe the attatched
>patch does so.  Other modules should be able to make use of the same
>functionality as described in the comments; this should also work when
>Apache runs as an inetd daemon.  I've tested it an it appears to work

Global variables are not reliable.  I prefer Doug's method of determining
if the request is the initial one.  Using my code, it would be

int is_initial_req(request_rec *r)
{
    return ((r->main == NULL) && (r->prev == NULL));
}

Is there some condition we are missing?

.....Roy

Re: lingering_close and performance

Posted by Ed Korthof <ed...@organic.com>.
On Tue, 18 Feb 1997, Roy T. Fielding wrote:
[snip note about global varialbes... not relevant in light of the code
below.]

> int is_initial_req(request_rec *r)
> {
>     return ((r->main == NULL) && (r->prev == NULL));
> }
> 
> Is there some condition we are missing?

Nope. +1.  The only thing I'd suggest is that this be made inline
or a macro. 

Heh.  Hadn't seen the 'prev' member... I seem to remember walking through
execution and seeing more calls to parse_headers_browser_module than I am
with the current code base, but regardless, this works fine now. 

     -- Ed Korthof        |  Web Server Engineer --
     -- ed@organic.com    |  Organic Online, Inc --
     -- (415) 278-5676    |  Fax: (415) 284-6891 --