httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: problem with log url overflow found
Date Sat, 11 Jan 1997 20:47:25 GMT

Cool. So is the fix just to change the comparison below to:

if (rv == 0)


> Check out http_request.c, line 160:
> 
>         rv = stat(path, &r->finfo);
> 
> On some systems, when you get too many '/'s, the stat will return -1.
> That is why some people can't see it.  I would be other web servers 
> (and lots of other programs) have the same problem.
> 
> I added some debugging output and got the below on a FreeBSD 2.1.5
> system.  Note the line that says "stat of /usr/local... returned
> -1".  A log from a trial with less '/'s is shown below this log.
> 
> [Sat Jan 11 13:30:27 1997] entering directory_walk, st_mode = 0
> [Sat Jan 11 13:30:27 1997] entering get_path_info, st_mode = 0
> [Sat Jan 11 13:30:27 1997] stat of /usr/local/etc/httpd/htdocs returned 0
> [Sat Jan 11 13:30:27 1997] exiting get_path_info early1, st_mode = 16893
> [Sat Jan 11 13:30:27 1997] returning normally from directory_walk, st_mode = 16893
> [Sat Jan 11 13:30:28 1997] entering directory_walk, st_mode = 0
> [Sat Jan 11 13:30:28 1997] entering get_path_info, st_mode = 0
> [Sat Jan 11 13:30:28 1997] stat of /usr/local/etc/httpd/htdocs/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////index.html returned -1
> [Sat Jan 11 13:30:28 1997] stat of /usr/local/etc/httpd/htdocs returned 0
> [Sat Jan 11 13:30:28 1997] setting st_mode to 0 in get_path_info
> [Sat Jan 11 13:30:28 1997] exiting get_path_info early1, st_mode = 0
> [Sat Jan 11 13:30:28 1997] returning normally from directory_walk, st_mode = 0
> [Sat Jan 11 13:30:28 1997] checking file index.html, uri: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> ///////////////////////////////////////index.html
>  status: 200 st_mode: 0
> 
> 
> Trying "http://alive/////////////////////////" gives what is expected:
> 
> [Sat Jan 11 13:32:31 1997] entering directory_walk, st_mode = 0
> [Sat Jan 11 13:32:31 1997] entering get_path_info, st_mode = 0
> [Sat Jan 11 13:32:31 1997] stat of /usr/local/etc/httpd/htdocs returned 0
> [Sat Jan 11 13:32:31 1997] exiting get_path_info early1, st_mode = 16893
> [Sat Jan 11 13:32:31 1997] returning normally from directory_walk, st_mode = 16893
> [Sat Jan 11 13:32:31 1997] entering directory_walk, st_mode = 0
> [Sat Jan 11 13:32:31 1997] entering get_path_info, st_mode = 0
> [Sat Jan 11 13:32:31 1997] stat of /usr/local/etc/httpd/htdocs/////////////////////////index.html
returned 0
> [Sat Jan 11 13:32:31 1997] exiting get_path_info early1, st_mode = 33188
> [Sat Jan 11 13:32:31 1997] returning normally from directory_walk, st_mode = 33188
> [Sat Jan 11 13:32:31 1997] checking file index.html, uri: /////////////////////////index.html
>  status: 200 st_mode: 33188
> [Sat Jan 11 13:32:31 1997] internal redirect from /////////////////////////index.html
to /////////////////////////index.html
> 
> [Sat Jan 11 13:32:31 1997] entering directory_walk, st_mode = 0
> [Sat Jan 11 13:32:31 1997] entering get_path_info, st_mode = 0
> [Sat Jan 11 13:32:31 1997] stat of /usr/local/etc/httpd/htdocs/////////////////////////index.html
returned 0
> [Sat Jan 11 13:32:31 1997] exiting get_path_info early1, st_mode = 33188
> [Sat Jan 11 13:32:31 1997] returning normally from directory_walk, st_mode = 33188
> 




Mime
View raw message