You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Nick Sayer <ns...@quack.kfu.com> on 1997/09/11 23:50:08 UTC

os-freebsd/1122: CGI output includes spurious Content-Type: header

>Number:         1122
>Category:       os-freebsd
>Synopsis:       CGI output includes spurious Content-Type: header
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Sep 11 14:50:01 1997
>Originator:     nsayer@quack.kfu.com
>Organization:
apache
>Release:        1.2b6 & 1.3a1
>Environment:
FreeBSD 2.2.2. Does _not_ happen with SunOS 4.1.x
>Description:
Sample session:

POST /cgi-bin/page HTTP/1.0
Content-Length: 25

who=test&message=daklsjdasldjaskldalsHTTP/1.1 200 OK
Date: Thu, 11 Sep 1997 21:43:11 GMT
Server: Apache/1.3a1
Connection: close
Content-Type: text/html

Content-Type: text/html

<head><title>Page sent</title>
</head><body><H1>Page sent.</H1></body>

The actual binary simply outputs the Content-type, a blank line, and the HTML.
If I don't include the content type header, the type is sent as text/plain,
but there is no duplicate header.
>How-To-Repeat:
The actual printf in the C source is

printf("Content-Type: text/html\n\n");

later on the HTML is printed.
>Fix:

>Audit-Trail:
>Unformatted: