version 1.164, 2018/12/30 00:49:54 |
version 1.166, 2019/03/06 12:32:41 |
Line 324 http_encode(const char *p) |
|
Line 324 http_encode(const char *p) |
|
for (; *p != '\0'; p++) { |
for (; *p != '\0'; p++) { |
if (isalnum((unsigned char)*p) == 0 && |
if (isalnum((unsigned char)*p) == 0 && |
strchr("-._~", *p) == NULL) |
strchr("-._~", *p) == NULL) |
printf("%%%02.2X", (unsigned char)*p); |
printf("%%%2.2X", (unsigned char)*p); |
else |
else |
putchar(*p); |
putchar(*p); |
} |
} |
Line 1178 parse_path_info(struct req *req, const char *path) |
|
Line 1178 parse_path_info(struct req *req, const char *path) |
|
} |
} |
|
|
/* Optional section. */ |
/* Optional section. */ |
if (strncmp(path, "man", 3) == 0) { |
if (strncmp(path, "man", 3) == 0 || strncmp(path, "cat", 3) == 0) { |
path += 3; |
path += 3; |
end = strchr(path, '/'); |
end = strchr(path, '/'); |
free(req->q.sec); |
free(req->q.sec); |