summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgi.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/cgi.c b/cgi.c
index a24b3af5..45e998ef 100644
--- a/cgi.c
+++ b/cgi.c
@@ -314,12 +314,12 @@ resp_begin_http(int code, const char *msg)
{
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"
- "Cache-Control: no-cache\n"
- "Pragma: no-cache\n"
- "");
+ printf("Content-Type: text/html; charset=utf-8\r\n"
+ "Cache-Control: no-cache\r\n"
+ "Pragma: no-cache\r\n"
+ "\r\n");
fflush(stdout);
}
@@ -484,12 +484,13 @@ resp_search(const struct req *req, struct manpage *r, size_t sz)
* If we have just one result, then jump there now
* without any delay.
*/
- puts("Status: 303 See Other");
+ printf("Status: 303 See Other\r\n");
printf("Location: http://%s%s/show/%s/%s?",
httphost, scriptname, req->q.manpath, r[0].file);
http_printquery(req);
- puts("\n"
- "Content-Type: text/html; charset=utf-8\n");
+ printf("\r\n"
+ "Content-Type: text/html; charset=utf-8\r\n"
+ "\r\n");
return;
}