httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: httpd-2.0/server request.c
Date Fri, 31 Aug 2001 05:05:58 GMT
jwoolley    01/08/30 22:05:58

  Modified:    server   request.c
  Log:
  As I understand it, this test is supposed to read like so:
  
  ----------------------------------------------------
  if the base paths are the same
      if (strncmp(rnew->filename, fdir, fdirlen) == 0
  
  and there's more stuff in the new filename than just the base path
          && rnew->filename[fdirlen]
  
  and that stuff contains no slashes
          && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL)
  ----------------------------------------------------
  
  Assuming that's a correct translation, which I believe to be the case
  (and which also seems to jive with the previous version of the test),
  then that first part darned well better check == 0, as opposed to != 0.
  strncmp returns 0 when they match.  =-)
  
  And voila,
  "All tests successful, 1 test skipped."
  is the result from httpd-test
  
  Revision  Changes    Path
  1.42      +1 -1      httpd-2.0/server/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/request.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -d -u -r1.41 -r1.42
  --- request.c	2001/08/31 02:31:08	1.41
  +++ request.c	2001/08/31 05:05:58	1.42
  @@ -1565,7 +1565,7 @@
        * either, if the base paths match, we can pick up where we leave off.
        */
   
  -    if (strncmp(rnew->filename, fdir, fdirlen) != 0
  +    if (strncmp(rnew->filename, fdir, fdirlen) == 0
              && rnew->filename[fdirlen] 
              && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL) 
       {
  
  
  

Mime
View raw message