[htdig] Patch for case_sensistive


Geoff Hutchison (ghutchis@wso.williams.edu)
Wed, 14 Jul 1999 23:08:14 -0400 (EDT)


Several people mentioned a bug with 3.1.2 (and earlier) with the operation
of case_sensitive. Since I don't have a case insensitive server around, I
can't test this patch very thoroughly. But it *should* fix this problem.

Please let me know if it works for you.

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

diff -c -3 -p -r1.25 URL.cc
*** htlib/URL.cc 1999/06/13 02:13:07 1.25
--- htlib/URL.cc 1999/07/15 02:23:53
*************** void URL::normalizePath()
*** 398,403 ****
--- 398,407 ----
              pathend = _path.length();
        }
  
+ // If the server *isn't* case sensitive, we want to lowercase the path
+ if (!config["case_sensitive"])
+ _path.lowercase();
+
      // And don't forget to remove index.html or similar file.
      removeIndex(_path);
  }
*************** void URL::dump()
*** 422,427 ****
--- 426,433 ----
  void URL::path(char *newpath)
  {
      _path = newpath;
+ if (!config["case_sensitive"])
+ _path.lowercase();
      constructURL();
  }

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Wed Jul 14 1999 - 19:31:21 PDT