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
0 answers

Can I find out if a server supports a specific Content-Encoding of http requests?

Could someone please tell me if it is possible to find out if a server supports a particular Content-Encoding or not? I am making REST API calls to multiple servers and it seems some don't support "gzip" Content-Encoding of the requests. Can I…
Roshan
  • 290
  • 3
  • 16
1
vote
1 answer

Does internet Explorer 7 honour the Vary header by caching properly?

I'm using a technique similar to Rick Strahls example, but have notcied using google's speed tracer that Resource Caching : @10.88s - The following resources specify a "Vary" header that disables caching in most versions of Internet Explorer. Fix…
digiguru
  • 12,724
  • 20
  • 61
  • 87
1
vote
1 answer

No content encoding in response header

server.xml file in /Tomcat 6.0/conf is given below.
skmaran.nr.iras
  • 8,152
  • 28
  • 81
  • 116
1
vote
2 answers

Reasons why gzipped content might not be grokked by the browser

I'm attempting to serve static resources (css and javascript) as cached gzipped files for performance reasons. The pages look gzipped when rendered, the Content-Encoding is correctly set to gzip according to LiveHTTPHeaders, and most importantly,…
JJ.
  • 4,974
  • 5
  • 39
  • 48
1
vote
1 answer

Http response with "Content-Encoding: gzip", but the content is not gzipped

I have a question regarding gzip. Suppose the server adds the “Content-Encoding: gzip” header. But, the actual content is not gzipped (assuming the compression failed and it is sending the data without compression). What will be the impact of…
1
vote
0 answers

How to get the "transfer-encoding" and "Content-Encoding" headers from external urls with PHP?

I have a client who would like to get a web-based report on all the headers from a webservice response. My client also uses SoapUI to check on method responses and he can double-check the response headers on that application. I have tried PHP…
vnobre
  • 11
  • 2
1
vote
1 answer

setting a Content-Type in CakePHP when the response is large-ish (>4kB)

Quite simply, I'm trying to generate and download a CSV file from a CakePHP controller. No problem generating the CSV, and everything works until the response >= 4096 bytes. The following controller illustrates the problem: class TestTypeController…
Ryan Skraba
  • 1,108
  • 9
  • 25
1
vote
1 answer

Remove gzip encoding in Zend

Lots of questions here from people trying to implement gzip encoding in Zend - I need to do the opposite! I have a controller which extends the standard Zend_Controller_Action. My downloadAction has a PDF file as it's response body. That works well,…
Grokling
  • 182
  • 2
  • 9
0
votes
1 answer

Can I split a gziped content-encoding across multiple HTTP chunks?

Can I split a gziped content-encoding across multiple chunks? Are there any known implementations that fail with this?
unixman83
  • 9,421
  • 10
  • 68
  • 102
0
votes
1 answer

In which RFC is =xx notation defined?

For form/multipart-data, I've seen input that has the form =[2 to 6 hex chars]. I'm wondering which RFC defines it? I want to encode non-file form data to a binary char stream so that iconv doesn't produce bad output. I reckon the behavior is…
moshbear
  • 3,282
  • 1
  • 19
  • 33
0
votes
0 answers

HTTP header for decompressed length

When using Content-Encoding: gzip, Content-Length is the compressed, post-gzip-encoding size. I want to add a header for the uncompressed, pre-gzip-encoding size. An embedded application will read this and preallocate a correctly sized buffer for…
Max
  • 2,760
  • 1
  • 28
  • 47
0
votes
1 answer

spring boot response encoding not working

I've configured my spring boot(2.5.5) application to enable response encoding by providing below properties in application.properties I'm using the default embedded tomcat as a…
0
votes
1 answer

Content Encoding Error but only for the first time when you visit the page on Drupal

When i visit it for the first time this error shows up. If i reload the page again this error is gone. We have same website setup in UAT and in DEV but they do not have any such errors.
3rdi
  • 475
  • 4
  • 12
0
votes
1 answer

In Python how to add headers for a file after gzip before writing it

I am trying to open a javascript file, read it, gzip it and then write it back to another file.. able to do all that.. but how can set the "Content-Encoding : gzip" before writing the compressed content... here is the code: import os, sys,…
Santosh S Kumar
  • 469
  • 1
  • 6
  • 30
0
votes
0 answers

Synonimity of *;charset=X and content-encoding=X

Aren't UTF-8/16/etc encodings and not charsets (the charset is UTF)? Also, in RFC 9110. Section 8.3.2. "In the fields defined by this document, charset names appear either in parameters (Content-Type), or, for Accept-Encoding, in the form of a plain…