diff options
author | Eric Covener <covener@apache.org> | 2024-06-26 12:09:29 +0200 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2024-06-26 12:09:29 +0200 |
commit | f2db4112861b10192de7a1a42321b42cb8a2ba55 (patch) | |
tree | b5708fae5ed5a0767684115716290217f24c8e9f /include | |
parent | mod_proxy: follow up to r1918626: Simplify ap_proxy_fixup_uds_filename() and ... (diff) | |
download | apache2-f2db4112861b10192de7a1a42321b42cb8a2ba55.tar.xz apache2-f2db4112861b10192de7a1a42321b42cb8a2ba55.zip |
factor out IS_SLASH, perdir fix
in per-dir, the filename will be internally redirected, so / is OK too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918651 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/httpd.h | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 4e942ada1d..ad4b77bd33 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -730,6 +730,7 @@ * 20211221.23 (2.5.1-dev) Add ap_set_content_type_ex(), ap_filepath_merge(), * and AP_REQUEST_TRUSTED_CT BNOTE. * 20211221.24 (2.5.1-dev) Add ap_proxy_fixup_uds_filename() + * 20211221.25 (2.5.1-dev) AP_SLASHES and AP_IS_SLASH */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -737,7 +738,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20211221 #endif -#define MODULE_MAGIC_NUMBER_MINOR 24 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 25 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/httpd.h b/include/httpd.h index 02ad323893..c02b3b7849 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -2879,6 +2879,17 @@ AP_DECLARE(apr_status_t) ap_filepath_merge(char **newpath, #define apr_filepath_merge ap_filepath_merge #endif +/* Win32/NetWare/OS2 need to check for both forward and back slashes + * in ap_normalize_path() and ap_escape_url(). + */ +#ifdef CASE_BLIND_FILESYSTEM +#define AP_IS_SLASH(s) ((s == '/') || (s == '\\')) +#define AP_SLASHES "/\\" +#else +#define AP_IS_SLASH(s) (s == '/') +#define AP_SLASHES "/" +#endif + #ifdef __cplusplus } #endif |