www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Michelinakis <s...@altered.com>
Subject mod_cgi/8032: CGI's are not allowed to set HTTP/1.x responce headers.
Date Sun, 15 Jul 2001 13:14:03 GMT

>Number:         8032
>Category:       mod_cgi
>Synopsis:       CGI's are not allowed to set HTTP/1.x responce headers.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Jul 15 06:20:00 PDT 2001
>Originator:     sehh@altered.com
>Release:        1.3.xx
OS/2 Warp Server for e-business ACP level
When i try to set for example a responce from a CGI to 301 Moved permanently,
i get an Internal Server Error.

It seems that Apache won't allow the CGI script to set the HTTP/1.x responce
header, it only allows it to start with the usual Content-type header.
Create a cgi script which outputs:

HTTP/1.0 301 Moved Permanently
Content-type: text/html
Location: http://www.apache.org

<html><body>Moved to http://www.apache.org</body></html>

This output should actually redirect your browser to http://www.apache.org,
but it won't do it with Apache, it works fine with other web servers.
Apache should check if the first thing the CGI writes to STDOUT is an
HTTP header, and replace its own with the one the CGI gave us.
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message