httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Nasrat" <pnas...@googlemail.com>
Subject [users@httpd] mod_include and mod_deflate interaction with virtual ssi includes
Date Tue, 25 Mar 2008 14:36:35 GMT
I've noticed an issue with using mod_include virtual includes and
mod_deflate on 2.2.8.

I've paired down a reproducer:

Setup - fresh install  of Apache 2.2.8 built using
--enable-layout=Apache --enable-deflate

Using attached httpd.conf (changes Listen, enables compression and includes)

mkdir /usr/local/apache2/ssi

cat ssi/index.html
<h1>Included</h1>

cat htdocs/test.shtml
START
<!--#include virtual="/ssi/"-->
END

curl -o ~/test -vv  -H 'Accept-Encoding: gzip' http://localhost:8081/test.shtml
* About to connect() to localhost port 8081 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 8081 (#0)
> GET /test.shtml HTTP/1.1
> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
> Host: localhost:8081
> Accept: */*
> Accept-Encoding: gzip
>
< HTTP/1.1 200 OK
< Date: Tue, 25 Mar 2008 13:49:27 GMT
< Server: Apache/2.2.8 (Unix)
< Accept-Ranges: bytes
< Vary: Accept-Encoding
< Content-Encoding: gzip
< Transfer-Encoding: chunked
< Content-Type: text/html
<

file ~/test
/Users/pnasrat/test: data

hexdump -C ~/test
00000000  3c 68 31 3e 49 6e 63 6c  75 64 65 64 3c 2f 68 31  |<h1>Included</h1|
00000010  3e 0a 1f 8b 08 00 00 00  00 00 00 03 0b 0e 71 0c  |>.............q.|
00000020  0a e1 e2 72 f5 73 e1 02  00 bd 52 71 7a 0b 00 00  |.??r?s?..?Rqz...|
00000030  00                                                |.|
00000031

$ dd if=~/test of=~/foo.gz bs=1 skip=18
31+0 records in
31+0 records out
31 bytes transferred in 0.000457 secs (67862 bytes/sec)
$ file ~/foo.gz
/Users/pnasrat/foo.gz: gzip compressed data, from Unix
$ gzcat ~/foo.gz
START

END

Also replicated on 2.2.x branch, I was hoping the fix for PR 44447,
changeset on branch 637902 might be related but no joy.

Server version: Apache/2.2.9-dev (Unix)
Server built:   Mar 25 2008 14:26:34
Server's Module Magic Number: 20051115:12
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

 cat logs/error_log
[Tue Mar 25 13:44:00 2008] [notice] Apache/2.2.8 (Unix) configured --
resuming normal operations
[Tue Mar 25 14:26:53 2008] [notice] caught SIGTERM, shutting down
[Tue Mar 25 14:28:10 2008] [notice] Apache/2.2.9-dev (Unix) configured
-- resuming normal operations

Paul

Mime
View raw message