* Decodes a '%' escaped string, and returns the number of characters */
| 111 | * Decodes a '%' escaped string, and returns the number of characters |
| 112 | */ |
| 113 | static int decodeenc(char *x) |
| 114 | { |
| 115 | int i, j, ch; |
| 116 | |
| 117 | if (x[0] == '\0') |
| 118 | return 0; /* special case for no characters */ |
| 119 | for (i = 0, j = 0; x[i] != '\0'; i++, j++) { |
| 120 | /* decode it if not already done */ |
| 121 | ch = x[i]; |
| 122 | if (ch == '%' && apr_isxdigit(x[i + 1]) && apr_isxdigit(x[i + 2])) { |
| 123 | ch = ap_proxy_hex2c(&x[i + 1]); |
| 124 | i += 2; |
| 125 | } |
| 126 | x[j] = ch; |
| 127 | } |
| 128 | x[j] = '\0'; |
| 129 | return j; |
| 130 | } |
| 131 | |
| 132 | /* |
| 133 | * Escape the globbing characters in a path used as argument to |
no test coverage detected