1 --- a/networking/httpd.c
2 +++ b/networking/httpd.c
3 @@ -1294,10 +1294,10 @@ static NOINLINE void cgi_io_loop_and_exi
4 if (full_write(STDOUT_FILENO, HTTP_200, sizeof(HTTP_200)-1) != sizeof(HTTP_200)-1)
8 - if (!strstr(rbuf, "ontent-")) {
9 - full_write(s, "Content-type: text/plain\r\n\r\n", 28);
10 + if (!strstr(rbuf, "ontent-") && !strstr(rbuf, "ocation:")) {
11 + full_write(1, "Content-type: text/plain\r\n\r\n", 28);
13 + /* Previously commented out:
14 * Counter-example of valid CGI without Content-type:
15 * echo -en "HTTP/1.0 302 Found\r\n"
16 * echo -en "Location: http://www.busybox.net\r\n"