| 2047 | */ |
| 2048 | |
| 2049 | AP_DECLARE(char *) ap_escape_path_segment_buffer(char *copy, const char *segment) |
| 2050 | { |
| 2051 | const unsigned char *s = (const unsigned char *)segment; |
| 2052 | unsigned char *d = (unsigned char *)copy; |
| 2053 | unsigned c; |
| 2054 | |
| 2055 | while ((c = *s)) { |
| 2056 | if (TEST_CHAR(c, T_ESCAPE_PATH_SEGMENT)) { |
| 2057 | d = c2x(c, '%', d); |
| 2058 | } |
| 2059 | else { |
| 2060 | *d++ = c; |
| 2061 | } |
| 2062 | ++s; |
| 2063 | } |
| 2064 | *d = '\0'; |
| 2065 | return copy; |
| 2066 | } |
| 2067 | |
| 2068 | AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment) |
| 2069 | { |
no test coverage detected