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

expressjs rejecting post request (400 bad request) when content-type and content-ecoding headers are sent together

app.use( express.text({type: 'text/xml'}), express.json({type: 'application/json'}), other middlewares...) ``` Post method headers: { connection: 'keep-alive', 'content-length': '1082', 'content-encoding': 'gzip', …
Balha
  • 17
  • 4
0
votes
0 answers

Content-Encoding gzip error when request image

I have a simple node route for an image. I set the Content-Encoding to gzip and i get this error in browser http://localhost:4000/image net::ERR_CONTENT_DECODING_FAILED 200 (OK) app.get("/image", (req, res) => { res.set("Cache-Control", "public,…
George Paouris
  • 525
  • 4
  • 16
0
votes
1 answer

IIS 8.5 Static Compression missing Content-Encoding response header, yet Failed Request Tracing shows compression with gzip

I observed that Content-Encoded response header was missing, notably Content-Encoded: gzip. I'm using static content compression. The dynamic content compression feature was never installed. I installed it, enabled it, and tested again. This time,…
user3621633
  • 1,681
  • 3
  • 32
  • 46
0
votes
0 answers

Nginx Content-Encoding does not seem to work for images in my Next.js app

I have the following declared in my server block in my nginx config to serve my Next.js app: location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; …
strangeQuirks
  • 4,761
  • 9
  • 40
  • 67
0
votes
2 answers

How to send json data from browser to REST endpoint (PUT) in gzip form using nodejs?

I'm using node.js with express. I have my home page which after loading will hit my REST endpoint (PUT) sending some json data.I'm not gziping the data while sending to REST end point.But at my endpoint I want it in gzip form is it possible ? If so…
Geek
  • 481
  • 5
  • 20
0
votes
0 answers

Java unsupported Content-Encoding: br

I'm try to fix a java app that process the html page by a URL and get the bytes of content // this a simplified part of code private static final Pattern PAT_CHARSET = Pattern.compile("charset=([^; ]+)$"); HttpURLConnection conn =…
Vito Lipari
  • 795
  • 8
  • 35
0
votes
0 answers

Forcing Google Cloud storage to respond with Content-Encoding

I would like to serve some Unreal-generated HTML5 files using Google Cloud storage. Some of the files are gzip-encoded, and one of the javascript files checks that every file which ends with gz is returned with Content-Encoding: gzip. I don't want…
0
votes
2 answers

Can you translate php function quoted_printable_decode() to an NSString-based, objective-C function / category method?

In http://php.net/quoted_printable_decode, I found ways to do it using preg_replace. Anyone who knows any code that could convert a normal NSString to something RFC 2045 section 6.7? Thanks in advance!
jopes
  • 245
  • 2
  • 13
0
votes
1 answer

Laravel API returns Invalid JSON

In routes/api.php I have created following route Route::get('/config', function(){ return response()->json([ 'cdn' => cdn_url(), 'slide_image_path' => '/uploads/front-slides/', 'offer_image_path' => '/uploads/offers/', …
Amarjit Singh
  • 2,068
  • 19
  • 52
0
votes
0 answers

how to set content-encoding metadata tags in gzip header files?

I am using webpack's compression plugin to gzip the content of files(html, js) and then I published gzip files removing the extension .gz to server(AWS/Nginx/Apache). compression plugin of webpack's configuration: new CompressionPlugin({ …
Samir
  • 691
  • 5
  • 22
0
votes
1 answer

Setting Request.ContentEncoding

I have a page that supports multiple languages (the user can change the language at any time). I update the thread's culture based on the user selection in the Initialize Culture method. I also update the response object based on the code page for…
NoviceProgrammer
  • 3,347
  • 1
  • 22
  • 32
0
votes
1 answer

Getting Error 500 or Content Encoding Error doing large MySQL inserts from CSV

/beginnote This question was marked as 'duplicate'. It is different from the referenced question because in my application I cannot use LOAD IN as the input file will never be nicely formatted so I -have- to read it in line by line to test for…
jchwebdev
  • 5,034
  • 5
  • 21
  • 30
0
votes
1 answer

400 error after adding "Content-Encoding" header to request

I'm trying to do a POST call by adding "Content-Encoding" Header to the request. Here is my code Invocation.Builder builder = webTarget.request(MediaType.APPLICATION_XML).header("Content-Encoding", "xml").accept(MediaType.TEXT_PLAIN); String…
0
votes
2 answers

How can I tell that the content of this URL is gzip-encoded?

I am downloading a Helm chart from https://kubernetes-charts.storage.googleapis.com/redis-0.5.1.tgz. (The fact that it is Redis or related to Helm or anything in particular is irrelevant to this question, which is just about things like…
Laird Nelson
  • 15,321
  • 19
  • 73
  • 127
0
votes
2 answers

Setting iso-8859-1 instead of utf-8 in oscommerce / sts template website?

In an oscommerce site I have the following: Server response = Content-type: text/html;charset=UTF-8 and I want: Content-type: text/html;charset=ISO-8859-1 How and where do I set this up. Html looks like this on the page: