Commit 2fcedab8 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Stop appending a backslash if some trailing slash is present.

  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
parent 0454702f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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>]
+3 −2
Original line number Diff line number Diff line
@@ -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';
            }