[Xerte] toolkits export (solution)
David Goodwin
david at palepurple.co.uk
Mon Jan 5 15:34:28 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Goodwin wrote:
> Patrick Lockley wrote:
As a belated follow up to this....
The problem we saw was that IE would pop up a warning message saying the
file was invalid. Yet, the same export url would work fine in e.g. Firefox.
The problem was caused by the server doing deflate compression through
the following Apache config :
"
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.swf$ no-gzip dont-vary
</IfModule>
"
One fix to this seems to be to tell the server :
<IfModule mod_rewrite.c>
RewriteCond Request_URI export_[0-9]+$
RewriteRule ^(.*)$ $1 [QSA,E=no-gzip:1,PT,L]
</IfModule>
(i.e. for URLS like export_{NUMBER} don't do gzip compression).
An alternative solution from a PHP point of view, could be that the
mod_rewrite rule instead generates a realistic URL like e.g.
export_55.zip, rather than export_55).
thanks
David.
- --
David Goodwin Pale Purple Limited
Office: 0845 0046746 Mobile: 07792380669
http://www.palepurple.co.uk Company No: 5580814
'Business Web Application Development and Training in PHP'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJYiiE/ISo3RF5V6YRAk9kAJ9dtq1dL227okVqPOqkrWNvT9IgiwCbBxCj
xKZSMT/GmeT4FLAk11ot88k=
=slma
-----END PGP SIGNATURE-----
More information about the Xerte
mailing list