version 1.152, 2017/03/18 16:19:11 |
version 1.153, 2017/03/18 16:48:24 |
Line 554 pg_error_internal(void) |
|
Line 554 pg_error_internal(void) |
|
static void |
static void |
pg_redirect(const struct req *req, const char *name) |
pg_redirect(const struct req *req, const char *name) |
{ |
{ |
printf("Status: 303 See Other\r\n"); |
printf("Status: 303 See Other\r\n" |
printf("Location: http://%s/", HTTP_HOST); |
"Location: /"); |
if (*scriptname != '\0') |
if (*scriptname != '\0') |
printf("%s/", scriptname); |
printf("%s/", scriptname); |
if (strcmp(req->q.manpath, req->p[0])) |
if (strcmp(req->q.manpath, req->p[0])) |
Line 591 pg_searchres(const struct req *req, struct manpage *r, |
|
Line 591 pg_searchres(const struct req *req, struct manpage *r, |
|
* If we have just one result, then jump there now |
* If we have just one result, then jump there now |
* without any delay. |
* without any delay. |
*/ |
*/ |
printf("Status: 303 See Other\r\n"); |
printf("Status: 303 See Other\r\n" |
printf("Location: http://%s/%s%s%s/%s", |
"Location: /"); |
HTTP_HOST, scriptname, |
if (*scriptname != '\0') |
*scriptname == '\0' ? "" : "/", |
printf("%s/", scriptname); |
req->q.manpath, r[0].file); |
if (strcmp(req->q.manpath, req->p[0])) |
printf("\r\n" |
printf("%s/", req->q.manpath); |
"Content-Type: text/html; charset=utf-8\r\n" |
printf("%s\r\n" |
"\r\n"); |
"Content-Type: text/html; charset=utf-8\r\n\r\n", |
|
r[0].file); |
return; |
return; |
} |
} |
|
|