httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: trailing slash bug
Date Tue, 04 Apr 1995 15:39:40 GMT
Third time's the charm.  This should, incidentally, also fix the bogus
MultiViews error messages in your error_log:

Only in ../src.ref: Makefile
diff -c ../src.ref/http_get.c ./http_get.c
*** ../src.ref/http_get.c	Sun Apr  2 10:49:39 1995
--- ./http_get.c	Tue Apr  4 15:35:02 1995
***************
*** 149,155 ****
      if(S_ISDIR(finfo.st_mode)) {
          char ifile[MAX_STRING_LEN];
  
!         if(file[strlen(file) - 1] != '/') {
              char url[MAX_STRING_LEN];
              strcpy_dir(ifile,file);
              unmunge_name(ifile);
--- 149,155 ----
      if(S_ISDIR(finfo.st_mode)) {
          char ifile[MAX_STRING_LEN];
  
!         if(pa[0] != '/') {
              char url[MAX_STRING_LEN];
              strcpy_dir(ifile,file);
              unmunge_name(ifile);
***************
*** 159,166 ****
          }
          make_full_path(file,index_name,ifile);
          if(stat(ifile,&finfo) == -1) {
! 	    if(handle_multi(ifile, MAX_STRING_LEN, 0, allow_options,
! 			    &finfo, fd))
  	        send_file (ifile,fd,&finfo,pa,args,in);
              else if(allow_options & OPT_INDEXES)
                  index_directory(file,fd);
--- 159,167 ----
          }
          make_full_path(file,index_name,ifile);
          if(stat(ifile,&finfo) == -1) {
! 	    if(allow_options & OPT_MULTI
! 	       && handle_multi(ifile, MAX_STRING_LEN, 0, allow_options,
! 			       &finfo, fd))
  	        send_file (ifile,fd,&finfo,pa,args,in);
              else if(allow_options & OPT_INDEXES)
                  index_directory(file,fd);
Only in ../src.ref: http_mime.c.orig
Only in ../src.ref: http_mime_db.c.orig
diff -c ../src.ref/http_script.c ./http_script.c
*** ../src.ref/http_script.c	Tue Apr  4 14:48:27 1995
--- ./http_script.c	Tue Apr  4 15:35:03 1995
***************
*** 57,63 ****
      *need_multi = 0;
      path_args[0] = '\0';
  
!     for (cp = end; cp > path;) {
        
  	/* See if the pathname ending here exists... */
        
--- 57,68 ----
      *need_multi = 0;
      path_args[0] = '\0';
  
!     /* Advance over trailing slashes ... NOT part of filename */
! 
!     for (cp = end; cp > path && cp[-1] == '/'; --cp)
! 	continue;
!     
!     while (cp > path) {
        
  	/* See if the pathname ending here exists... */
        
Only in ../src.ref: http_script.c.orig

Mime
View raw message