Bug#509116: apache2: mod_deflate with mod_fastcgi gives wrong content-length header
Package: apache2.2-common Version: 2.2.9-10+lenny1 Severity: normal On upgrading from Etch to Lenny I got exceeding slow response on some FastCGI servers. It was identified that the line: AddOutputFilterByType DEFLATE text/html text/plain text/xml application/json application/x-javascript which adds the "deflate" filter is the culprit. On inspection with "curl": curl -D h1 http://simon.example.com/ >b1 % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 33180 100 331800 0 389k 0 --:--:-- --:--:-- --:--:-- 826k curl --compressed -D h2 http://simon.example.com/ >b2 % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 25 33180 25 86120 0572 0 0:00:58 0:00:15 0:00:43 0 curl: (18) transfer closed with 24568 bytes remaining to read b1 and b2 are identical. The "content-length" header in h2 was still 33180, where as I'd expect this page to compress effectively. So the slow response is the web browser timing out, but finding all the data it needs is already in memory. Likely cause is bad interaction with mod_fastcgid, which we are using here to deploy a Catalyst application, as the content is dynamic in nature. I'm not an expert in these things. This combination of mod_fastcgi and mod_deflate was broken in Sarge, but it resulted in the content being sent without compression, where as here the result is simply broken HTTP response, because it is being compressed, but the content-length header is wrong. I see old reports of similar problems in Google. e.g. http://archives.devshed.com/forums/dsm-125/apache-2-mod-deflate-mod-fastcgi-1284864.html Shall go try mod_fcgid. -- Package-specific info: List of /etc/apache2/mods-enabled/*.load: actions alias auth_basic auth_digest authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi dav dav_fs dav_svn deflate dir env expires fastcgi fcgid include mime negotiation perl rewrite setenvif ssl status userdir zembperl -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages apache2 depends on: ii apache2-mpm-prefork 2.2.9-10+lenny1 Apache HTTP Server - traditional n apache2 recommends no packages. apache2 suggests no packages. Versions of packages apache2.2-common depends on: ii apache2-utils 2.2.9-10+lenny1 utility programs for webservers ii libapr11.2.12-5 The Apache Portable Runtime Librar ii libaprutil11.2.12+dfsg-8 The Apache Portable Runtime Utilit ii libc6 2.7-16GNU C Library: Shared libraries ii libmagic1 4.26-1File type determination library us ii libssl0.9.80.9.8g-14 SSL shared libraries ii lsb-base 3.2-20Linux Standard Base 3.2 init scrip ii mime-support 3.44-1MIME files 'mime.types' & 'mailcap ii net-tools 1.60-22 The NET-3 networking toolkit ii perl 5.10.0-18 Larry Wall's Practical Extraction ii procps 1:3.2.7-8 /proc file system utilities ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime -- no debconf information -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Apache2 mod_include and php segfault issue
Hi, I hit a problem with Apache2 on Squeeze which I had to abandon and work around, however it is of a character that makes me unhappy just to leave it, and I don't have a reproducible case I can share yet to file a bug report. I had a PHP website that included a file "include/textblock.php" which you could access "http://example.com/include/textblock?name=test"; and it queried a database and spat out a piece of text from a database with some HTML formatting. I decided to try and include this using SSI into another page of the same website (specifically /test.php ). So I did a "Options +Multiview +Include" and "AddOutputFilter INCLUDES .php" on virtual host. Added a line; At this point the retrieval of the page fell over at the end of the first PHP loop after the SSI include of PHP code. Inspection of where it fell down suggested it was something to do with a style statement with "background-color" in it, but I couldn't get consistent sensible behaviour. Not sure that this configuration is suppose to work but it seemed worth trying, since it would save rewriting the include as a PHP function or similar. The SSI documentation implies QUERY_STRING may not be what I expect. I could have working page, and no include, or segfault and half a page returned by toggling mod_include with a2enmod. Am I simply corrupting the PHP runtime environment by invoking it this way? No errors or warnings except for the segfault. [notice] child pid 15811 exit signal Segmentation fault (11) I wrote a PHP function after scratching head a little. ii apache22.2.16-6+squeeze7 Apache HTTP Server metapackage ii apache2-doc2.2.16-6+squeeze7 Apache HTTP Server documentation ii apache2-mpm-prefork2.2.16-6+squeeze7 Apache HTTP Server - traditional non-threaded model ii apache2-utils 2.2.16-6+squeeze7 utility programs for webservers ii apache2.2-bin 2.2.16-6+squeeze7 Apache HTTP Server common binary files ii apache2.2-common 2.2.16-6+squeeze7 Apache HTTP Server common files ii libapache2-mod-auth-pgsql 2.0.3-5 Module for Apache2 which provides pgsql authentication ii libapache2-mod-fcgid 1:2.3.6-1+squeeze1 an alternative module compat with mod_fastcgi ii libapache2-mod-fcgid-dbg 1:2.3.6-1+squeeze1 debugging symbols for mod_fcgid ii libapache2-mod-php55.3.3-7+squeeze8 server-side, HTML-embedded scripting language (Apache 2 module) -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f9ea99d.4030...@zynet.net
Bug#671171: apache2.2: mod_speling offers only permanent redirects
Package: apache2.2-bin Version: 2.2.16-6+squeeze4zynet1 Severity: wishlist File: apache2.2 mod_speling offers only permanent redirects, whilst this saves on CPU it means that you are potentially storing issues for renaming content of a web site in future as browsers will cache this indefinitely. I propose a patch that adds "SpellingRedirectTemporary" So that adding "SpellingRedirectTemporary On" to the configuation causes Apache to issue 302 redirects instead of 301, which are pre-expired causing clients to always retry. -- System Information: Debian Release: 6.0.4 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-25-hvmflexiant (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apache2.2-bin depends on: ii libapr11.4.2-6+squeeze3 The Apache Portable Runtime Librar ii libaprutil11.3.9+dfsg-5 The Apache Portable Runtime Utilit ii libaprutil1-dbd-sqlite 1.3.9+dfsg-5 The Apache Portable Runtime Utilit ii libaprutil1-ldap 1.3.9+dfsg-5 The Apache Portable Runtime Utilit ii libc6 2.11.3-2 Embedded GNU C Library: Shared lib ii libcap21:2.19-3 support for getting/setting POSIX. ii libldap-2.4-2 2.4.23-7.2OpenLDAP libraries ii libpcre3 8.02-1.1 Perl 5 Compatible Regular Expressi ii libssl0.9.80.9.8o-4squeeze12 SSL shared libraries ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime apache2.2-bin recommends no packages. apache2.2-bin suggests no packages. -- no debconf information --- orig/httpd-2.2.16/modules/mappers/mod_speling.c 2008-04-17 15:10:52.0 +0100 +++ apache2-2.2.16/modules/mappers/mod_speling.c 2012-05-02 09:50:15.0 +0100 @@ -60,6 +60,7 @@ typedef struct { int enabled; int case_only; +int redirect_temporary; } spconfig; /* @@ -77,6 +78,7 @@ cfg->enabled = 0; cfg->case_only = 0; +cfg->redirect_temporary = 0; return cfg; } @@ -109,6 +111,9 @@ AP_INIT_FLAG("CheckCaseOnly", ap_set_flag_slot, (void*)APR_OFFSETOF(spconfig, case_only), OR_OPTIONS, "whether or not to fix only miscapitalized requests"), +AP_INIT_FLAG("SpellingRedirectTemporary", ap_set_flag_slot, + (void*)APR_OFFSETOF(spconfig, redirect_temporary), OR_OPTIONS, + "whether to issue a 301 or a 302 on spelling errors"), { NULL } }; @@ -399,6 +404,8 @@ : "Fixed spelling: %s to %s", r->uri, nuri, ref); + if (cfg->redirect_temporary == 1) return HTTP_MOVED_TEMPORARILY; + return HTTP_MOVED_PERMANENTLY; } /*