version 1.61, 2014/07/10 00:52:50 |
version 1.62, 2014/07/11 22:25:44 |
Line 314 resp_begin_http(int code, const char *msg) |
|
Line 314 resp_begin_http(int code, const char *msg) |
|
{ |
{ |
|
|
if (200 != code) |
if (200 != code) |
printf("Status: %d %s\n", code, msg); |
printf("Status: %d %s\r\n", code, msg); |
|
|
puts("Content-Type: text/html; charset=utf-8\n" |
printf("Content-Type: text/html; charset=utf-8\r\n" |
"Cache-Control: no-cache\n" |
"Cache-Control: no-cache\r\n" |
"Pragma: no-cache\n" |
"Pragma: no-cache\r\n" |
""); |
"\r\n"); |
|
|
fflush(stdout); |
fflush(stdout); |
} |
} |
Line 484 resp_search(const struct req *req, struct manpage *r, |
|
Line 484 resp_search(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. |
*/ |
*/ |
puts("Status: 303 See Other"); |
printf("Status: 303 See Other\r\n"); |
printf("Location: http://%s%s/show/%s/%s?", |
printf("Location: http://%s%s/show/%s/%s?", |
httphost, scriptname, req->q.manpath, r[0].file); |
httphost, scriptname, req->q.manpath, r[0].file); |
http_printquery(req); |
http_printquery(req); |
puts("\n" |
printf("\r\n" |
"Content-Type: text/html; charset=utf-8\n"); |
"Content-Type: text/html; charset=utf-8\r\n" |
|
"\r\n"); |
return; |
return; |
} |
} |
|
|