diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2006-06-22 10:00:40 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2006-06-22 10:00:40 +0200 |
commit | cb6b3dac930887eab83c6d721d0e63e7f5c050cd (patch) | |
tree | 602b004562e28c18e39ea6b67f7abb0be6c2e763 /modules/arch/win32/mod_isapi.c | |
parent | mod_isapi: Handle "HTTP/1.1 200 OK" style status lines correctly, the (diff) | |
download | apache2-cb6b3dac930887eab83c6d721d0e63e7f5c050cd.tar.xz apache2-cb6b3dac930887eab83c6d721d0e63e7f5c050cd.zip |
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
Diffstat (limited to '')
-rw-r--r-- | modules/arch/win32/mod_isapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index e4ec5d004e..5ccb61f50c 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -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'; } |