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

AWS API Gateway return response as GZIP

I have a application deployed in API gateway i.e APIG -> ELB -> ECS. When I request for gzip, i.e Accept: application/json; Accept-Encoding:application/gzip. The content is unreadable by client (browser,fiddler). But the same request triggered via…
0
votes
2 answers

404 error after adding Content-Encoding as request header

I have to add Content-Encoding and Accept-Encoding as headers(with gzip compression) to HttpWebRequest object. Setting Accept-Encoding is done by adding this line: request.AutomaticDecompression = DecompressionMethods.GZip; and it is ok. However,…
0
votes
1 answer

Should HTTP proxy copy Content-Encoding header back to client?

It's said that Transport will handle the Content-Encoding automatically (like auto decompressing when reading from resp.Body). It's also said that, Content-Encoding is an end-to-end HTTP header, not a hop-by-hop one. Therefore, if a proxy copied…
dastan
  • 1,006
  • 1
  • 16
  • 36
0
votes
1 answer

AppEngine Content-Encoding header doesn't appear

I'm trying to send a compressed file through AppEngine, my function is func handleWebGLRequest(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) blobKey, err := blobstore.BlobKeyForFile(c, "/gs//WebGL.datagz") …
0
votes
3 answers

Combine two content encodings sections in a single page

I developed a web application that allows users to modify existing web pages. When a user type a url of an existing web page, I read the content of this page and using an ajax call, i display the content in a div inside my web application. Now my…
AmirGl
  • 1
  • 1
0
votes
1 answer

Defining text encoding in a file containing JSON

My application stores configuration data (including strings for the UI) in a text file containing JSON. For example, config.json might contain the following: { "CustomerName" : "Omni Consumer Products", "SubmitButtonText": "Click here to…
Mike Ruhlin
  • 3,546
  • 2
  • 21
  • 31
0
votes
1 answer

How to compress an HTTP response with zlib for HTTP?

I am writing a small server http which always send his generated html page(it discard the client request). This is for a part of a larger program I want to use content-encoding for minimizing the Local bandwith usage... I started by trying this…
user2284570
  • 2,891
  • 3
  • 26
  • 74
0
votes
1 answer

http-conduit: Transfer data using gzip

I intend to fetch a large amount of data over HTTP/HTTPS using http-conduit. In order to do this efficiently, I want to use the Accept-Encoding: deflate,gzip header to allow the server (if supported) to transfer the data in a compressed…
Uli Köhler
  • 13,012
  • 16
  • 70
  • 120
0
votes
3 answers

Why do Umlauts and special characters not show up correctly in my Grails pages?

How do I make sure the correct encoding (UTF-8) is used by Grails?
Epaga
  • 38,231
  • 58
  • 157
  • 245
0
votes
1 answer

ASP.NET Web API content encoding

I've created an API.NET Web API. It uses the default utf-8 content encoding. I need the output to be in latin-1 to match the database.
S..
  • 5,511
  • 2
  • 36
  • 43
0
votes
2 answers

VS2005 UTF-8 generic HTTP handler: issues with certain chars in query string (e.g. þ æ)

I am developing a generic HTTP handler in VS2005 and testing it in Debug Mode. It works well except when the query string contains higher-bit characters, e.g. Latin Small Letter Thorn /u00FE þ and Latin Small Letter Ae /u00E6 æ. IE8 on my machine…
Tim
  • 23
  • 4
0
votes
2 answers

pyramid FileResponse encoding

I'm trying to serve base64 encoded image files and failing. Either I get UTF-8 encoded responses or the line return response errors in an interesting way. Mostly everything I've tried can be seen as commented out code in the excerpt below. Details…
Sheena
  • 15,590
  • 14
  • 75
  • 113
0
votes
1 answer

How to use gzip Content-Encoding in plain text upload?

I have a situation where user required to download big text file (1-15 MB) CSV file which after edited using Excel, re-uploaded as-is (edited CSV) to site using web browser in the same page. gzip encoding applied for download and content sent to…
arie
  • 44
  • 4
0
votes
1 answer

How to get the charset from an HTML page

I'm trying to get the charset attribute in any HTML meta tag. (ie.< meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >) Is there any way to do that in C++ under linux. I was using HTML tidy as a parser but I can't get that…
Alejo
  • 787
  • 2
  • 9
  • 15
0
votes
3 answers

Image file produced by the server is corrupt/incorrect

I am using Jersey (ver 1.9.1) to implement RESTful web service for png images. I'm using Apache HttpClient (ver. 4x) at client side. The code on client side calls HttpGet to download image. On successful download, it saves the InputStream from…
Pawan
  • 1,183
  • 16
  • 29
1 2 3
10
11