Attachment 'gzip_ecap_extended_compressible_types.patch'

Download

   1 --- src/adapter_gzip.cc		Wed Jun  8 21:21:10 2016
   2 +++ src/adapter_gzip.cc		Wed Jun  8 22:38:26 2016
   3 @@ -367,7 +367,7 @@
   4  
   5  	/**
   6  	 * Checks the Content-Type response header.
   7 -	 * At this time, only responses with "text/*" content-type are allowed to be compressed.
   8 +	 * text/*,application/xml|x-javascript|javascript|x-protobuf types supported
   9  	 */
  10  	static const libecap::Name contentTypeName("Content-Type");
  11  	
  12 @@ -384,7 +384,17 @@
  13  			contentTypeType = contentTypeString.substr(0,4);
  14  			if(strstr(contentTypeType.c_str(),"text")) {
  15  				this->requirements.responseContentTypeOk = true;
  16 -			}
  17 +			} else if((strstr(contentTypeType.c_str(),"appl"))||(contentType.size >=15)) {
  18 +				contentTypeType = contentTypeString.substr(12,3);
  19 +				//  application/xml
  20 +                                  if(strstr(contentTypeType.c_str(),"xml"))
  21 +					{this->requirements.responseContentTypeOk = true;}
  22 +			} else if((strstr(contentTypeType.c_str(),"appl"))||(contentType.size >=22 && contentType.size <= 25)) {
  23 +                                contentTypeType = contentTypeString.substr(12,10);
  24 +				// application/javascript, application/x-javascript, x-protobuffer
  25 +                                  if((strstr(contentTypeType.c_str(),"x-javascri"))||(strstr(contentTypeType.c_str(),"javascript"))||(strstr(contentTypeType.c_str(),"x-protobuf")))
  26 +					{this->requirements.responseContentTypeOk = true;}
  27 +                        }
  28  		}
  29  	}
  30  

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2016-06-08 18:00:06, 1.4 KB) [[attachment:gzip_ecap_extended_compressible_types.patch]]
  • [get | view] (2016-06-11 20:37:49, 1.6 KB) [[attachment:gzip_ecap_extended_compressible_types_latest.patch]]
  • [get | view] (2016-06-08 21:13:39, 1.4 KB) [[attachment:gzip_ecap_extended_compressible_types_v1.patch]]
  • [get | view] (2016-06-09 12:19:51, 1.6 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_2.patch]]
  • [get | view] (2016-06-11 20:31:49, 1.6 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_2.patch.latest]]
  • [get | view] (2016-06-12 14:51:20, 1.9 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_3.patch]]
  • [get | view] (2016-06-20 20:35:35, 1.2 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_4.patch]]
  • [get | view] (2016-06-20 20:50:23, 2.1 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_5.patch]]
  • [get | view] (2016-06-20 21:26:21, 1.8 KB) [[attachment:gzip_ecap_extended_compressible_types_v1_6.patch]]
  • [get | view] (2016-06-18 16:44:11, 0.8 KB) [[attachment:gzip_ecap_vb_stop_on_done_v1.patch]]
  • [get | view] (2016-06-08 17:56:50, 1.4 KB) [[attachment:gzip_exap_extended_compressible_types.patch]]
  • [get | view] (2015-03-29 19:40:02, 1.5 KB) [[attachment:squid-ecap-gzip_all_text_compressed.patch]]
  • [get | view] (2015-03-29 19:35:49, 8.5 KB) [[attachment:squid-ecap-gzip_up_to_libecap-0.2.0.patch]]
  • [get | view] (2015-03-29 19:35:56, 9.2 KB) [[attachment:squid-ecap-gzip_up_to_libecap-1.0.0.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.