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
1
vote
1 answer

Possible to send HTTP 1.1 Footers from PHP using Transfer-Encoding: chunked?

Having tried and failed to get a manual implementation of chunked Transfer-Encoding with gzipped Content-Encoding working in PHP, I'm now back to using mod_deflate in Apache, which does a nice job. Only problem is, there are some footers I'd like to…
Don MacAskill
  • 868
  • 1
  • 7
  • 14
1
vote
0 answers

EntityUtils.toString throws java.io.EOFException when content length is not provided in response header

I am making an HTTP Get call using Apache HTTPClient (4.x). httpResponse = httpClient.execute(call, context); HttpEntity responseEntity = httpResponse.getEntity(); content = EntityUtils.toString(responseEntity); It throws the following…
1
vote
1 answer

Azure Storage Account Static Website takes lot of time to load

I have deployed my Single Page Applicate built in Angular in Azure Storage Account Static Website. But it takes lot of time to load the website initially. After investigation I found that it takes about 1.2 min to load one js file -…
1
vote
3 answers

What is the default Content Encoding for jmeter HTTP Request sampler?

I am looking at the Content Encoding field in the HTTP Request sampler. Don't confuse this with the HTTP Content-Type header. By default the value in the Content Encoding field is empty. What does empty mean? What is the default content encoding for…
variable
  • 8,262
  • 9
  • 95
  • 215
1
vote
1 answer

Discrepancy in text/plain content encoding returned by Gmail API

I am experimenting with reading multipart/mixed emails with GMail API. The goal is to correctly decode each text/plain part of the multipart/mixed email (there can be many, in different encodings) to a C# string (i.e. UTF-16): public static string…
GSerg
  • 76,472
  • 17
  • 159
  • 346
1
vote
2 answers

How do I download compressed content on a S3 drive as plain text?

I have HTML data stored on a S3 bucket served as a static site which is stored in gzipped form. Though I can access my S3 site correctly and the browser knows to uncompress it, I can't download it using AWS CLI because the raw data that gets…
Eternal Rubyist
  • 3,445
  • 4
  • 34
  • 51
1
vote
1 answer

POST responses not compressed despite Accept-Encoding Header being present in a request

I have encountered a strange case. I am working with a Spring Boot application which consists of a few different services. For each service, in a application.properties file, those properties were…
1
vote
1 answer

Python shows a different view of the content than web browser

I have a Python inventory update script which runs nightly, pulling inventory from a website. I recently started having issues, and upon further investigation found that when I view the source content via a web browser (view source), it looks…
1
vote
0 answers

Post request with Content-Encoding: GZIP, DEFLATE possible?

I have a problem with my Micronaut backend and it's decoding. I want to post content with following header and gzipped body content: Content-Encoding: GZIP but my Micronaut backend can't decode it. Is there a workaround, for example a…
Alphawolf88
  • 35
  • 1
  • 3
1
vote
0 answers

What is the use of Binary encoding when we have Character encoding?

I use to think that the use of binary encoding is because every device has its way to interpret bytes. Thus if a router sends a bit as some significant information other router might treat this byte as a parity byte or something else... But isn't it…
1
vote
1 answer

OutputCache is not working if content encoding addded to header

I have a controller and an action in it. public class LoginController { [OutputCache(Duration = 10000, VaryByParam = "none")] public ActionResult Logout() { ...... } } Above code is working and there is no problem with…
brtb
  • 2,201
  • 6
  • 34
  • 53
1
vote
0 answers

"xpress" content-encoding decoding tool

Is there any binary tool or implementation source code example, which can decode and encode content in "xpress" content-encoding? The only thing I could find, is the [MS-XCA]: Xpress Compression Algorithm verbal description. It is required to…
DmitriyH
  • 420
  • 4
  • 15
1
vote
1 answer

AWS S3 serving gzipped files but not readable

I'm using AWS S3 to host a static webpage, almost all assets are gzipped before being uploaded. During the upload the "content-encoding" header is correctly set to "gzip" (and this also reflects when actually loading the file from AWS). The thing…
1
vote
0 answers

Is there an IANA media type for Brotli compression?

For gzip, there is an IANA media type "application/gzip" and an HTTP content encoding abbreviation "gzip". For Brotli, there is a content encoding "br". Is there an IANA media type for Brotli compressed data? If not, why not? pvde
pvde
  • 11
  • 2
1
vote
0 answers

Request file from s3 without gzip encoding

I have a little app which is accessing files on S3. I'm dealing with 3 different file types, and some are gzipped and some are not. I've got a bit of code which is looking at the file type (unfortunately no extension, so I have to try decoding for…
pedalpete
  • 21,076
  • 45
  • 128
  • 239