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 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>]
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';
}