]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Stop appending a backslash if some trailing slash is present.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Jun 2006 08:00:40 +0000 (08:00 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Jun 2006 08:00:40 +0000 (08:00 +0000)
  For cross platform isapi we aught to find out what to add from
  apr, slash or backslash, but can't think of the trivial answer
  at this hour.

PR: 15993

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@416291 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/arch/win32/mod_isapi.c

diff --git a/CHANGES b/CHANGES
index 263e3cbd451c895ff9e5c07c46cc130a41637c33..03d077c04dd17e52112cfd617c9deebb8ea75b66 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_isapi: Avoid double trailing slashes in HSE_REQ_MAP_URL_TO_PATH
+     support (although this needs a bit more elegance for cross platform
+     isapi handling.)  PR 15993  [William Rowe]
+
   *) mod_isapi: Handle "HTTP/1.1 200 OK" style status lines correctly, the
      token parser worked while the resulting length was misinterpreted.
      PR 29098 [Brock Bland <bbland serena.com>]
index e4ec5d004e69aabe51a76e1a57281318e40e4f27..5ccb61f50c921aa3cbc1d4c051e02dbb88308618 100644 (file)
@@ -960,9 +960,10 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid    *cid,
         len = apr_cpystrn(file, subreq->filename, *buf_size) - file;
 
 
-        /* IIS puts a trailing slash on directories, Apache doesn't */
+        /* IIS puts a trailing slash on directories, Apache may not */
         if (subreq->finfo.filetype == APR_DIR) {
-            if (len < *buf_size - 1) {
+            if ((len < *buf_size - 1) && (file[len - 1] != '/') 
+                                      && (file[len - 1] != '\\')) {
                 file[len++] = '\\';
                 file[len] = '\0';
             }