MCPcopy Create free account
hub / github.com/apache/httpd / ap_escape_path_segment_buffer

Function ap_escape_path_segment_buffer

server/util.c:2049–2066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047 */
2048
2049AP_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
2068AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment)
2069{

Callers 1

ap_escape_path_segmentFunction · 0.85

Calls 1

c2xFunction · 0.70

Tested by

no test coverage detected