Return-Path: Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 72480 invoked from network); 11 Apr 2002 15:08:39 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Apr 2002 15:08:39 -0000 Received: (qmail 16438 invoked by uid 50); 11 Apr 2002 15:08:20 -0000 Date: 11 Apr 2002 15:08:20 -0000 Message-ID: <20020411150820.16437.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: bugs@httpd.apache.org Cc: Subject: DO NOT REPLY [Bug 7966] New: - Wrong Content-Length when SSI used as DirectoryIndex X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7966 Wrong Content-Length when SSI used as DirectoryIndex Summary: Wrong Content-Length when SSI used as DirectoryIndex Product: Apache httpd-2.0 Version: 2.0.35 Platform: PC URL: http://www.nanvaent.org:81/ OS/Version: FreeBSD Status: NEW Severity: Normal Priority: Other Component: All AssignedTo: bugs@httpd.apache.org ReportedBy: apache-bugzilla@kolbu.com In some cases, the Content-Length used remains the length of the file on disk, even though the content of the file is changed by SSIs before transfer to client. This happens only when the file in question is used as a DirectoryIndex, i.e. http://www.nanvaent.org:81/. If explicitly gotten, i.e. http://www.nanvaent.org:81/oktest.shtml, it transfers fine (presumably because the server does not include a Content-Length: header in that case). The weird part is that _sometimes_ it actually works... Example: In httpd.conf: DirectoryIndex oktest.shtml AddType text/html .shtml AddOutputFilter INCLUDES .shtml File /cgi-bin/oktest.cgi --- cut here --- #!/bin/sh echo Content-Type: text/html echo echo TeSt --- cut here --- File /oktest.shtml (Note, 54 bytes long) --- cut here --- --- cut here --- Some tests with wget, the first one explicitly asking for the file: strider tmp # wget -O - -S http://www.nanvaent.org:81/oktest.shtml --16:57:45-- http://www.nanvaent.org:81/oktest.shtml => `-' Resolving www.nanvaent.org... done. Connecting to www.nanvaent.org[194.70.3.222]:81... connected. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Thu, 11 Apr 2002 14:57:45 GMT 3 Server: Apache/2.0.35 (Unix) PHP/4.3.0-dev mod_ssl/2.0.35 OpenSSL/0.9.6a 4 Accept-Ranges: bytes 5 Connection: close 6 Content-Type: text/html; charset=ISO-8859-1 [<=> ] 0 --.--K/s TeSt [ <=> ] 21 20.51K/s 16:57:45 (20.51 KB/s) - `-' saved [21] Second test, just asking for the directory: strider tmp # wget -O - -S http://www.nanvaent.org:81/ --16:59:42-- http://www.nanvaent.org:81/ => `-' Resolving www.nanvaent.org... done. Connecting to www.nanvaent.org[194.70.3.222]:81... connected. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Thu, 11 Apr 2002 14:59:42 GMT 3 Server: Apache/2.0.35 (Unix) PHP/4.3.0-dev mod_ssl/2.0.35 OpenSSL/0.9.6a 4 Last-Modified: Thu, 11 Apr 2002 14:40:25 GMT 5 ETag: "364ce-36-65f60840" 6 Accept-Ranges: bytes 7 Content-Length: 54 8 Keep-Alive: timeout=15, max=200 9 Connection: Keep-Alive 10 Content-Type: text/html; charset=ISO-8859-1 0% [ ] 0 --.--K/s ETA --:-- TeSt 38% [=============> ] 21 20.51K/s ETA 00:00 16:59:57 (20.51 KB/s) - Connection closed at byte 21. Retrying. etc etc Note the Content-Length header.