From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s6BMPitA009677 for ; Fri, 11 Jul 2014 18:25:44 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s6BMPiEK008404; Fri, 11 Jul 2014 18:25:44 -0400 (EDT) Date: Fri, 11 Jul 2014 18:25:44 -0400 (EDT) Message-Id: <201407112225.s6BMPiEK008404@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: merge OpenBSD rev. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- merge OpenBSD rev. 1.2 by tedu@: http headers must end lines with CRLF. Modified Files: -------------- mdocml: cgi.c Revision Data ------------- Index: cgi.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/cgi.c,v retrieving revision 1.61 retrieving revision 1.62 diff -Lcgi.c -Lcgi.c -u -p -r1.61 -r1.62 --- cgi.c +++ cgi.c @@ -314,12 +314,12 @@ resp_begin_http(int code, const char *ms { 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, struc * 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; } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv