Attachment 'squid-ecap-gzip_all_text_compressed.patch'

Download

   1 --- adapter_gzip.cc 2011-02-13 17:42:20.000000000 +0300
   2 +++ ../../adapter_gzip.cc 2012-02-26 03:37:26.000000000 +0400
   3 @@ -353,17 +353,19 @@
   4  * At this time, only responses with "text/html" content-type are allowed to be compressed.
   5  */
   6  static const libecap::Name contentTypeName("Content-Type");
   7  -
   8  +
   9  // Set default value
  10  this->requirements.responseContentTypeOk = false;
  11 if(adapted->header().hasAny(contentTypeName)) {
  12  const libecap::Header::Value contentType = adapted->header().value(contentTypeName);
  13  -
  14  + std::string contentTypeType; // store contenttype substr
  15  +
  16  if(contentType.size > 0) {
  17  std::string contentTypeString = contentType.toString(); // expensive
  18  + contentTypeType = contentTypeString.substr(0,4);
  19  - if(strstr(contentTypeString.c_str(),"text/html")) {
  20  + if(strstr(contentTypeType.c_str(),"text")) {
  21  this->requirements.responseContentTypeOk = true;
  22  }
  23  }
  24 @@ -390,9 +392,9 @@
  25  adapted->header().removeAny(libecap::headerContentLength);// Add informational response header
  26  - static const libecap::Name name("X-Ecap");
  27  - const libecap::Header::Value value = libecap::Area::FromTempString("VIGOS eCAP GZIP Adapter");
  28  - adapted->header().add(name, value);
  29  + // static const libecap::Name name("X-Ecap");
  30  + // const libecap::Header::Value value = libecap::Area::FromTempString("VIGOS eCAP GZIP Adapter");
  31  + // adapted->header().add(name, value);// Add "Vary: Accept-Encoding"; response header if Content-Type is "text/html";
  32  if(requirements.responseContentTypeOk) {

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.