diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-11 22:25:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-11 22:25:44 +0000 |
commit | 6273b8a948dc78502b8197c70a1ed18548a053d0 (patch) | |
tree | 48c241ad2f288e06e5a220f3a388ca325f5666a0 /cgi.c | |
parent | aa9bd66e0014ab76d755481fd267c8a91b8b7ffc (diff) | |
download | mandoc-6273b8a948dc78502b8197c70a1ed18548a053d0.tar.gz |
merge OpenBSD rev. 1.2 by tedu@:
http headers must end lines with CRLF.
Diffstat (limited to 'cgi.c')
-rw-r--r-- | cgi.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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; } |