www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Porter <rich...@citizen1.com>
Subject general/3986: Premature end of script headers
Date Wed, 03 Mar 1999 00:23:27 GMT

>Number:         3986
>Category:       general
>Synopsis:       Premature end of script headers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Mar  2 16:30:00 PST 1999
>Originator:     richard@citizen1.com
>Release:        Server version: Apache/1.3.3 (Unix)
SunOS xxx 5.5.1 Generic_103640-21 sun4u sparc SUNW,Ultra-1

I didn't build the distribution, our sysadmin did. If you'd like more information about the
compiler and any compilation options, please let me know and I'll forward your request to
I've seen a lot of coverage of this error, and the responses from most people seem to be dismissive.
Both, "you can't program" and "this is a configuration error" are quite popular sentiments.

Well, I certainly can program (though I'm no expert at CGI) and I doubt a configuration error
would be intermittent in the fashion of this one.

This is a production machine, so we're a bit reluctant to throw 1.3.4 at it until we've had
a chance to test it out. If this is a bug in Apache that has been fixed in that version (and
not reported in the release notes) please advise.
Please run the following Java file with a command line parameter of

import java.io.*;
import java.net.*;

public class load {
  public static void main(String[] args) throws Exception {
    if (args.length != 1) {
      System.out.println("Usage: java load URL");

    int i = 1;
    int j = 1;
    while (true) {
      try {
        URL url = new URL(args[0]);
        HttpURLConnection http = (HttpURLConnection) url.openConnection();
        BufferedReader br = new BufferedReader(new InputStreamReader((InputStream)http.getInputStream()));
        for (String s = br.readLine();
             s != null;
             s = br.readLine())
          System.out.println(s + i++);

      catch (FileNotFoundException fnfe) {
        System.out.println("\tfailure" + j++);

The script called by this file is the following:


$oldpipe = $|;
$| = 1;
print "Content-type: text/html\r\n\r\n";
print "hello world";
$| = $oldpipe;

[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. ]
[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