httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject general/161: Questionable performace of mod_dir() with negotiation (fwd)
Date Sun, 17 Aug 1997 19:51:52 GMT
This was suspended pending the release of 1.2...

---------- Forwarded message ----------
Date: Wed, 5 Feb 1997 14:30:01 -0800 (PST)
From: Petr Lampa <lampa@fee.vutbr.cz>
To: gnats-admin@hyperreal.org
Cc: brian@hyperreal.org, apache-bugdb@apache.org
Subject: general/161: Questionable performace of  mod_dir() with negotiation


>Number:         161
>Category:       general
>Synopsis:       Questionable performace of  mod_dir() with negotiation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Feb  5 14:30:01 1997
>Originator:     lampa@fee.vutbr.cz
>Organization:
apache
>Release:        1.2b2, b3, b4, b6
>Environment:
FreeBSD-2.2BETA
>Description:
Problem reported for 1.2b2, still unresolved.

handle_multi() style shortcut redirect (fixed) would be
nice for other modules. For instance mod_dir()
would be much faster using such redirection.
Iff you trace calls for http://www.xxx/, you'll see, 
that mod_negotiation() is called twice for the same URI
due to standard redirect:
/ -> mod_dir() -> /Welcome.html -> handle_multi() -> select /Welcome.html.en ->
mod_dir() -> redirect -> /Welcome.html -> handle_multi() again!
This could be a serious performance hit.

>How-To-Repeat:

>Fix:
Use redirection shortcut similar to the handle_multi():

*** mod_dir.c.old   Sun Dec  1 21:28:59 1996
--- mod_dir.c    Mon Dec 30 19:20:49 1996
***************
*** 803,811 ****
                 new_uri = pstrcat(r->pool, new_uri, "?", rr->args, NULL);
             else if (r->args != NULL)
                 new_uri = pstrcat(r->pool, new_uri, "?", r->args, NULL);
!
!            destroy_sub_req (rr);
!            internal_redirect (new_uri, r);
             return OK;
        }

--- 790,815 ----
              new_uri = pstrcat(r->pool, new_uri, "?", rr->args, NULL);
           else if (r->args != NULL)
              new_uri = pstrcat(r->pool, new_uri, "?", r->args, NULL);
!
!         if (r->path_info && *r->path_info == '/') ++r->path_info; /* eat
o
ne slash for directory "/d'/'/ -> /d/index.html/" */
!         r->filename = rr->filename;
!         r->handler = rr->handler;
!         r->content_type = rr->content_type;
!         r->content_encoding = rr->content_encoding;
!         r->content_languages = rr->content_languages;
!         r->content_language = rr->content_language;
!         r->finfo = rr->finfo;
!     /* We don't want TRACE to run through the normal handler set,
!      * we handle it specially.
!      */
!         if (r->method_number == M_TRACE) send_http_trace (r);
!         else if ((error_notfound = invoke_handler (r)) != 0) {
!             die (error_notfound, r);
!             return;
!         }
!
!    /* Take care of little things that need to happen when we're done */
!         finalize_request_protocol (r);
          return OK;
      }
%0
>Audit-Trail:
>Unformatted:



Mime
View raw message