www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Porter <j...@porter.net.au>
Subject mod_cgi/3089: Data returned from Perl CGI script is getting truncated at exactly 4096 bytes (incl header)
Date Mon, 28 Sep 1998 04:04:44 GMT

>Number:         3089
>Category:       mod_cgi
>Synopsis:       Data returned from Perl CGI script is getting truncated at exactly 4096
bytes (incl header)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Sep 27 21:10:00 PDT 1998
>Last-Modified:
>Originator:     jack@porter.net.au
>Organization:
apache
>Release:        1.3.1, 1.3.2
>Environment:
RedHat 4.2, Linux 2.0.32, i386, gcc 2.7.2.1
Perl 5.004_04
httpd -l gives:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_auth_dbm.c
  mod_setenvif.c
  mod_ssl.c
  mod_php3.c
The page is served via regular HTTP and not SSL.
>Description:
Take this simple CGI script:

----
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open (F, "/full/path/to/some/page.html");
while(<F>) {
    print $_;
}
close (F);
----

It worked on Apache 1.2.5, and functions correctly when run from a unix shell.
After upgrading to Apache 1.3.1 and then 1.3.2, only the first 4071 bytes of the
file are included in the HTTP output - or exactly 4096 bytes including the
"Content-type: text/html\n\n" header.

Any idea what's going on here?

Thanks,
Jack
>How-To-Repeat:
Using the script above and a suitable long HTML file.
>Fix:
Sorry :-(
>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. ]
[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!         ]




Mime
View raw message