version 1.74, 2014/07/18 14:46:25 |
version 1.75, 2014/07/18 19:03:39 |
Line 79 static void resp_searchform(const struct req *); |
|
Line 79 static void resp_searchform(const struct req *); |
|
static void resp_show(const struct req *, const char *); |
static void resp_show(const struct req *, const char *); |
|
|
static const char *scriptname; /* CGI script name */ |
static const char *scriptname; /* CGI script name */ |
static const char *httphost; /* hostname used in the URIs */ |
|
|
|
static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; |
static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; |
static const char *const sec_numbers[] = { |
static const char *const sec_numbers[] = { |
Line 530 pg_searchres(const struct req *req, struct manpage *r, |
|
Line 529 pg_searchres(const struct req *req, struct manpage *r, |
|
* 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?", |
printf("Location: %s/%s/%s?", |
httphost, scriptname, req->q.manpath, r[0].file); |
scriptname, req->q.manpath, r[0].file); |
http_printquery(req); |
http_printquery(req); |
printf("\r\n" |
printf("\r\n" |
"Content-Type: text/html; charset=utf-8\r\n" |
"Content-Type: text/html; charset=utf-8\r\n" |
|
|
|
|
if (NULL == (scriptname = getenv("SCRIPT_NAME"))) |
if (NULL == (scriptname = getenv("SCRIPT_NAME"))) |
scriptname = ""; |
scriptname = ""; |
|
|
if (NULL == (httphost = getenv("HTTP_HOST"))) |
|
httphost = "localhost"; |
|
|
|
/* |
/* |
* First we change directory into the MAN_DIR so that |
* First we change directory into the MAN_DIR so that |