{"id":644,"date":"2008-11-01T21:28:30","date_gmt":"2008-11-02T02:28:30","guid":{"rendered":"http:\/\/bitpost.com\/news\/?p=644"},"modified":"2011-04-06T19:18:12","modified_gmt":"2011-04-07T00:18:12","slug":"mod_deflate-p0wn3d","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2008\/mod_deflate-p0wn3d\/","title":{"rendered":"[mod_deflate] p0wn3d"},"content":{"rendered":"<p>I recently discovered <a href=\"http:\/\/httpd.apache.org\/docs\/2.0\/mod\/mod_deflate.html\">[mod_deflate]<\/a>, which compresses webserver content before sending it out &#8211; if you&#8217;re not using it you should really check it out.  I turned it on and it worked flawlessly for me, with two exceptions.<\/p>\n<ol>\n<li>Server-side includes<br \/>\nThese just did not play well together out of the box&#8230;<\/li>\n<li>PHP and Perl &#8220;streaming&#8221; output<br \/>\nI have some scripts, most notably <a href=\"https:\/\/www.thedigitalmachine.com\/wiki\/index.php\/Imagescraper\">imagescraper<\/a>, that need to stream the html in the results page as it is computed, not all at once AFTER it is built, as mod_deflate requires.<\/li>\n<\/ol>\n<p>Turning off [mod_deflate] is trivial.  I used the no-gzip environment variable as follows:<\/p>\n<pre><code># MDM This is to disable [mod_deflate] for imagescraper, so we don't try to compress the streaming results...\r\n<Files images_google.pl>\r\n    SetEnv no-gzip 1\r\n<\/Files>\r\n\r\n# MDM Drop this into a virtual host block to TURN OFF [mod_deflate], so it doesn't break SSI.\r\nSetEnv no-gzip 1<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I recently discovered [mod_deflate], which compresses webserver content before sending it out &#8211; if you&#8217;re not using it you should really check it out. I turned it on and it worked flawlessly for me, with two exceptions. Server-side includes These just did not play well together out of the box&#8230; PHP and Perl &#8220;streaming&#8221; output [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[10,9],"tags":[68],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-tricks-tips-tools","category-websites","tag-mod_deflate"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-ao","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":4,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":1143,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/644\/revisions\/1143"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}