Questions tagged [content-encoding]

Use this tag for questions regarding specifying content encoding on HTTP requests.

A concept in HTTP/1.1 content negotiation to indicate encryption or compression of an HTTP response (such as gzip support).

The following headers are typically used to determine the content encoding of a response. However, servers are free to use other aspects they choose.

  • Accept
  • Accept-Charset
  • Accept-Encoding
  • Accept-Language
  • User-Agent

Typical values of the Transfer-Encoding header: gzip, compress, deflate, identity, *

155 questions
7
votes
2 answers

Replacement for HttpResponse.ContentEncoding ASP.NET 5

Does anyone know if there is a replacement in ASP.NET 5 for HttpResponse.ContentEncoding? https://msdn.microsoft.com/en-us/library/system.web.httpresponse.contentencoding(v=vs.110).aspx
koelkastfilosoof
  • 2,212
  • 1
  • 18
  • 28
7
votes
3 answers

In IIS7, gzipped files do not stay that way

I have configured IIS7 to gzip static content. http://www.coderjournal.com/2008/04/iis-7-compress-javascript-gzip/ However, the files don't "stay" gzipped. Here's my use case: Request test.css file. It is not gzipped. Request it again within a few…
frankadelic
  • 20,543
  • 37
  • 111
  • 164
7
votes
3 answers

How does server side GZipping work?

You might know that HTML related file formats are compressed using GZip compression, server side, (by mod_gzip on Apache servers), and are decompressed by compatible browsers. ("content encoding") Does this only work for HTML/XML files? Lets say my…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
5
votes
3 answers

Transparently Handling GZip Encoded content with WWW::Mechanize

I am using WWW::Mechanize and currently handling HTTP responses with the 'Content-Encoding: gzip' header in my code by first checking the response headers and then using IO::Uncompress::Gunzip to get the uncompressed content. However I would like…
Gurunandan Bhat
  • 3,544
  • 3
  • 31
  • 43
5
votes
1 answer

How to disable Nginx double gzip encoding when fastcgi backend occasionally serves gzipped with content-encoding?

Is there any clever way to trick nginx to stop gzip if the backend already has set the "content-encoding" header? Nginx is configured to gzip the output from the php fastcgi backend. This works great in 99% of the cases. Except on rare occasion php…
ck_
  • 3,353
  • 5
  • 31
  • 33
5
votes
2 answers

How can we verify whether gzip/deflate compression has worked in IE browsers or not?

In our Apache web server, we have enabled deflate compression. This has improved the speed of our site. We could verify this deflate compression in browsers other than IE by the looking at the value "Content-Encoding: gzip". We used tools like…
Vijey
  • 6,536
  • 7
  • 43
  • 50
4
votes
1 answer

How do I load a javascript library in Rhino, from a server that uses gzip encoding?

In rhino, I'm used to being able to load javascript libraries from a URL, e.g. load('http://latex.mathoverflow.net/mathjax/MathJax.js') (This doesn't actually work, unless you provide a browser-like environment first, via env.js or similar. But…
Scott Morrison
  • 3,100
  • 24
  • 39
4
votes
3 answers

Why does ob_start('ob_gzhandler') break this website?

I've got a site that throws a Content Encoding Error in the browser if a ob_start('ob_gzhandler') is present. If I remove the statement, it runs fine. The site runs off the same framework, server and hosting package as a number of other sites. They…
Jrgns
  • 24,699
  • 18
  • 71
  • 77
4
votes
1 answer

IE's XMLhttpRequest's getResponseHeader("Content-Length") absent when Content-Encoded sent

Why won't IE let me see the get the Content-Length header with getResponseHeader()? I know there the headers are being sent; I can see them with Wireshark. IE just won't let me get them. If the Content-Encoding header is NOT sent, regardless of if…
David Murdoch
  • 87,823
  • 39
  • 148
  • 191
4
votes
1 answer

IIS content-type wrong for compressed CSS

I develop part of an ASP.NET site that uses mostly themes but has a couple of CSS files in the themes folder. These are included in the web.config by another developer like so:
thinkOfaNumber
  • 2,581
  • 3
  • 27
  • 46
3
votes
1 answer

boto3 s3 copy_object with ContentEncoding argument

I'm trying to copy s3 object with boto3 command like below import boto3 client = boto3.client('s3') client.copy_object(Bucket=bucket_name, ContentEncoding='gzip', CopySource=copy_source, Key=new_key) To copy the object succeeded, but…
3
votes
1 answer

Node.js proxy, dealing with gzip DEcompression

I'm currently working on a proxy server where we in this case have to modify the data (by using regexp) that we push through it. In most cases it works fine except for websites that use gzip as content-encoding (I think), I've come across a module…
M0rph3v5
  • 945
  • 1
  • 11
  • 23
3
votes
3 answers

Node.js proxy, dealing with gzip compression

I'm currently working on a proxy server where we in this case have to modify the data (by using regexp) that we push through it. In most cases it works fine except for websites that use gzip as content-encoding (I think), I've come across a module…
M0rph3v5
  • 945
  • 1
  • 11
  • 23
3
votes
2 answers

Detect gzip encoding to manually decompress response, but 'Content-Encoding' header missing

I am using net/http library in 'Go' to make an HTTP GET request. In the response, i get 12 headers. But when i run the exact same query through postman, i get 16 headers. One of those missing is 'Content-Encoding'. I understand this must be a CORS…
Abdul Wasae
  • 3,614
  • 4
  • 34
  • 56
3
votes
1 answer

Duplicate headers in response / browsers failing intermittently

This problem seems to have started a few days ago without any code changes, my local tomcat server would just stop responding. My main filter breakpoints don't get hit, and only some resources get loaded. The ones that do fail, seems to have…
epoch
  • 16,396
  • 4
  • 43
  • 71
1
2
3
10 11