You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@Fujitsu-Siemens.com> on 2001/10/11 18:00:26 UTC

httpd-2.0: what happened to /manual ?

I just built a httpd-2.0 and installed.

Funnily, the index page from http://server/ is also displayed under
http://server/manual/ (but not when invoking
http://server/manual/index.html or http://server/manual/index.html.en).
Does that mean that mod_alias is wrong, or mod_negotiation, or
mod_userdir? I am confused. The behavior is really *very* funny.

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Re: httpd-2.0: what happened to /manual ?

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Fri, Oct 12, 2001 at 09:29:59AM +0200, Kraemer, Martin wrote:
> In the meantime, I get this when trying to access the /manual alias:
> 
> [Fri Oct 12 09:26:17 2001] [error] [client 172.25.124.236] File does not exist:
> /home/apa20/htdocs/manual/, referer: https://apache.mch.fsc.net:8443/
> httpd in free(): warning: chunk is already free.
> httpd in free(): warning: chunk is already free.
> 
I forgot to mention that the Alias is completely ignored, as it seems.
I get a 404 response when trying to access anything under manual/
and it's logged with filename .../htdocs/manual (although I do have an alias
to .../manual)

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Re: httpd-2.0: what happened to /manual ?

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Oct 11, 2001 at 11:58:40AM -0500, William A. Rowe, Jr. wrote:
> This sounds like an error in the new directory_walk... that we aren't
> dealing with /manual/ correctly (loosing a trailing slash, it sounds like.)
> 
> I'll investigate later this eve or tommorow morning, more news as it happens.

In the meantime, I get this when trying to access the /manual alias:

[Fri Oct 12 09:26:17 2001] [error] [client 172.25.124.236] File does not exist:
/home/apa20/htdocs/manual/, referer: https://apache.mch.fsc.net:8443/
httpd in free(): warning: chunk is already free.
httpd in free(): warning: chunk is already free.

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Re: httpd-2.0: what happened to /manual ?

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Martin Kraemer" <Ma...@Fujitsu-Siemens.com>
Sent: Thursday, October 11, 2001 11:00 AM


> I just built a httpd-2.0 and installed.
> 
> Funnily, the index page from http://server/ is also displayed under
> http://server/manual/ (but not when invoking
> http://server/manual/index.html or http://server/manual/index.html.en).
> Does that mean that mod_alias is wrong, or mod_negotiation, or
> mod_userdir? I am confused. The behavior is really *very* funny.

This sounds like an error in the new directory_walk... that we aren't
dealing with /manual/ correctly (loosing a trailing slash, it sounds like.)

I'll investigate later this eve or tommorow morning, more news as it happens.


Re: httpd-2.0: what happened to /manual ?

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Greg Ames" <gr...@remulak.net>
Sent: Tuesday, October 16, 2001 11:35 AM


> Brian Havard wrote:
> > 
> > On Sun, 14 Oct 2001 16:08:36 +1000 (EST), Brian Havard wrote:
> > 
> > >On Thu, 11 Oct 2001 18:00:26 +0200, Martin Kraemer wrote:
> > >
> > >>I just built a httpd-2.0 and installed.
> > >>
> > >>Funnily, the index page from http://server/ is also displayed under
> > >>http://server/manual/ (but not when invoking
> > >>http://server/manual/index.html or http://server/manual/index.html.en).
> > >>Does that mean that mod_alias is wrong, or mod_negotiation, or
> > >>mod_userdir? I am confused. The behavior is really *very* funny.
> > >
> > >Yeah, I'm seeing this too. Does anyone know what's going on here?
> > 
> > By a process of elimination I've narrowed it down to rev 1.68 of
> > server/request.c. That is, if I reverse it I get served the manual as expected.
> > The change is a little over my head at the moment though:
> 
> Sorry about that.  I did verify that some directory scenarios worked
> before commiting, but didn't test this URL.  I'll take a look.

All ready reverted, Greg.  Additional patches to request.c may have eliminated
some of the other problems you observed, Greg.  Please provide a detailed
example if you continue to see recursion.

Bill


Re: httpd-2.0: what happened to /manual ?

Posted by Greg Ames <gr...@remulak.net>.
Brian Havard wrote:
> 
> On Sun, 14 Oct 2001 16:08:36 +1000 (EST), Brian Havard wrote:
> 
> >On Thu, 11 Oct 2001 18:00:26 +0200, Martin Kraemer wrote:
> >
> >>I just built a httpd-2.0 and installed.
> >>
> >>Funnily, the index page from http://server/ is also displayed under
> >>http://server/manual/ (but not when invoking
> >>http://server/manual/index.html or http://server/manual/index.html.en).
> >>Does that mean that mod_alias is wrong, or mod_negotiation, or
> >>mod_userdir? I am confused. The behavior is really *very* funny.
> >
> >Yeah, I'm seeing this too. Does anyone know what's going on here?
> 
> By a process of elimination I've narrowed it down to rev 1.68 of
> server/request.c. That is, if I reverse it I get served the manual as expected.
> The change is a little over my head at the moment though:

Sorry about that.  I did verify that some directory scenarios worked
before commiting, but didn't test this URL.  I'll take a look.

Greg

Re: httpd-2.0: what happened to /manual ?

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Sun, 14 Oct 2001 16:08:36 +1000 (EST), Brian Havard wrote:

>On Thu, 11 Oct 2001 18:00:26 +0200, Martin Kraemer wrote:
>
>>I just built a httpd-2.0 and installed.
>>
>>Funnily, the index page from http://server/ is also displayed under
>>http://server/manual/ (but not when invoking
>>http://server/manual/index.html or http://server/manual/index.html.en).
>>Does that mean that mod_alias is wrong, or mod_negotiation, or
>>mod_userdir? I am confused. The behavior is really *very* funny.
>
>Yeah, I'm seeing this too. Does anyone know what's going on here?

By a process of elimination I've narrowed it down to rev 1.68 of 
server/request.c. That is, if I reverse it I get served the manual as expected. 
The change is a little over my head at the moment though:

------------------------------------------------------------------------
revision 1.68
date: 2001/10/09 01:33:48;  author: gregames;  state: Exp;  lines: +1 -5
prevent near infinite subrequest recursion with mod_negotiation enabled.
This can happen if there is a partial match between a bad URI and a
file with a variant extention.

ap_sub_req_lookup_dirent has apparently been generating bogus subrequest
URIs for ages, but they used to be ignored.  Once we started calling
ap_process_request_internal for all subrequests, they started causing
problems.  Make it explicit that rnew->uri is to be ignored for this type
of subrequest.

Index: request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/request.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- request.c	2001/10/08 22:07:32	1.67
+++ request.c	2001/10/09 01:33:48	1.68
@@ -1345,7 +1345,6 @@
     request_rec *rnew;
     int res;
     char *fdir;
-    char *udir;
 
     rnew = make_sub_request(r);
     fill_in_sub_req_vars(rnew, r, next_filter);
@@ -1363,15 +1362,12 @@
      * not even have to redo access checks.
      */
 
-    udir = ap_make_dirstr_parent(rnew->pool, r->uri);
-
     /* This is 100% safe, since dirent->name just came from the filesystem */
-    rnew->uri = ap_make_full_path(rnew->pool, udir, dirent->name);
     rnew->filename = ap_make_full_path(rnew->pool, fdir, dirent->name);
     if (r->canonical_filename == r->filename)
         rnew->canonical_filename = rnew->filename;
     
-    ap_parse_uri(rnew, rnew->uri);    /* fill in parsed_uri values */
+    rnew->uri = apr_pstrdup(rnew->pool, "");
 
     /* Preserve the apr_stat results, and perhaps we also tag that
      * symlinks were tested and/or found for r->filename.  

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Re: httpd-2.0: what happened to /manual ?

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Thu, 11 Oct 2001 18:00:26 +0200, Martin Kraemer wrote:

>I just built a httpd-2.0 and installed.
>
>Funnily, the index page from http://server/ is also displayed under
>http://server/manual/ (but not when invoking
>http://server/manual/index.html or http://server/manual/index.html.en).
>Does that mean that mod_alias is wrong, or mod_negotiation, or
>mod_userdir? I am confused. The behavior is really *very* funny.

Yeah, I'm seeing this too. Does anyone know what's going on here?

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------