version 1.165, 2019/01/31 23:00:23 |
version 1.167, 2019/07/10 12:49:20 |
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 869 resp_format(const struct req *req, const char *file) |
|
Line 869 resp_format(const struct req *req, const char *file) |
|
memset(&conf, 0, sizeof(conf)); |
memset(&conf, 0, sizeof(conf)); |
conf.fragment = 1; |
conf.fragment = 1; |
conf.style = mandoc_strdup(CSS_DIR "/mandoc.css"); |
conf.style = mandoc_strdup(CSS_DIR "/mandoc.css"); |
conf.toc = 1; |
|
usepath = strcmp(req->q.manpath, req->p[0]); |
usepath = strcmp(req->q.manpath, req->p[0]); |
mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S", |
mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S", |
scriptname, *scriptname == '\0' ? "" : "/", |
scriptname, *scriptname == '\0' ? "" : "/", |