www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Schabacker <c.schabac...@gis.ibfs.de>
Subject protocol/1813: After CGI (POST) HTTP-Headers shown in browser and internal Error "OK" (200)
Date Mon, 16 Feb 1998 16:04:02 GMT

>Number:         1813
>Category:       protocol
>Synopsis:       After  CGI (POST) HTTP-Headers shown in browser and internal Error "OK"
(200)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Feb 16 08:10:01 PST 1998
>Last-Modified:
>Originator:     c.schabacker@gis.ibfs.de
>Organization:
apache
>Release:        1.3b3
>Environment:
AIX 4.1.5, gcc 2.8.0
>Description:
After a CGI-Script returns (only POST method) i get some HTTP-Headers in 
the document.  Example Output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<TITLE>Passwort f. HTTP-Server &auml;ndern</TITLE>
<body>
<h1>Passwort wurde gešndert</h1>
</body>
HTTP/1.1 200 OK
Date: Mon, 16 Feb 1998 15:16:58 GMT
Server: Apache/1.3b3
Connection: close
Content-Type: text/html

After this i get the "internal error" message "<h1>OK</h1>"
>How-To-Repeat:
If you wish i can send you the .shtml and cgi script (python 1.5 with 
mod_python)
>Fix:
I think the problem is that the programm does not check if a header-string
is empty and always appends newlines.  [spurious newlines are added; grep 
for "\015\012" through 'src/main/http_protocol.c']
I think you bvputs/rvputs (or a wrapper around this) should test.

To hide the "OK"-Error-Message i applied this patch:

diff --recursive -u apache_1.3b3/src/main/http_protocol.c apache_1.3b3-modified/
src/main/http_protocol.c
--- apache_1.3b3/src/main/http_protocol.c       Sat Nov  1 23:24:08 1997
+++ apache_1.3b3-modified/src/main/http_protocol.c      Mon Feb 16 16:21:22 1998
@@ -2012,7 +2013,7 @@
         while (r->prev && (r->prev->status != HTTP_OK))
             r = r->prev;
     }
-    {
+    if( status != HTTP_OK) {
         char *title = status_lines[idx];
         /* folks decided they didn't want the error code in the H1 text */
 
%0
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]




Mime
View raw message