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

Requests module encoding provides different encode then HTML encode

The request module encoding provides different encoding then the actual set encoding in HTML page Code: import requests URL = "http://www.reynamining.com/nuevositio/contacto.html" obj = requests.get(URL, timeout=60, verify=False,…
The6thSense
  • 8,103
  • 8
  • 31
  • 65
3
votes
1 answer

Serving gzipped files using Spring Boot

I'm trying to serve gzipped log files using Spring Boot REST. Files are already gzipped, I don't need to gzip them. Browser should unzip them and show plain text. Based on the info I googled, I need two things to make it work: Set the following in…
miro
  • 149
  • 3
  • 11
3
votes
0 answers

IIS gZip Compression Not Working event after Setting Everything

I deployed a simple html page with ajax (loading a json file) in my iis 8.0 (windows 8) and iis7+ (windows 7). 1. I enabled static and dynamic compression in IIS 2. I have written all the tags in we.config and the same has been attached. Still I am…
Abhi
  • 255
  • 3
  • 20
3
votes
4 answers

Why does Perl's LWP gives me a different encoding than the original website?

Lets say i have this code: use strict; use LWP qw ( get ); my $content = get ( "http://www.msn.co.il" ); print STDERR $content; The error log shows something like "\xd7\x9c\xd7\x94\xd7\x93\xd7\xa4\xd7\xa1\xd7\x94" which i'm guessing it's utf-16…
Ricky Levi
  • 7,298
  • 1
  • 57
  • 65
3
votes
1 answer

http: minimum content-encoding support for clients?

Is there a minimum set of content-encodings that a http client must support? Restated: Is a client that only implements content-encoding:identity conformant with standards? I can't find clear documentation on the subject.
bukzor
  • 37,539
  • 11
  • 77
  • 111
3
votes
0 answers

how-to convert encoding with node.js feedparser for rss-feeds

How to parse this feed http://www.taraf.com.tr/rss/yazarlar/default.asp and show it as is on my website? I parse with feed-parser https://github.com/danmactough/node-feedparser, store in mongodb and show on website. result is gibberish. I don't even…
user1972450
3
votes
4 answers

What content encoding does a Perl CGI script use by default?

I'm modifying a mature CGI application written in Perl and the question of content encoding has come up. The browser reports that the content is iso-8859-1 encoded and the application is declaring iso-8859-1 as the charset in the HTTP headers but…
kierse
  • 373
  • 4
  • 10
3
votes
3 answers

Does a GunzipOutputStream - or something like it - exist?

Related to Handling HTTP ContentEncoding "deflate", I'd like to know how to use an OutputStream to inflate both gzip and deflate streams. Here's why: I have a class that fetches resources from a web server (think wget, but in Java). I have it…
Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77
2
votes
1 answer

How to decode response in AnyEvent::HTTP?

I'm writing a simple script using AnyEvent::HTTP which fetches several HTML-pages in parallel. The module doesn't do any content decoding, it just provides the response body and headers to the callback. What would be the proper way to decode the…
Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
2
votes
3 answers

To compress or not to compress?

Enabling compressing (gzip/deflate) in the Apache server will reduce the size of the response but will add more CPU cycles, I will run a stress test with various response sizes but I wanted to ask if in terms of server load is there any suggestion…
kambi
  • 3,291
  • 10
  • 37
  • 58
2
votes
2 answers

When serving JavaScript files, is it safe to gzip it by default

The question fits in the title. I am not interested in what the spec recommend but what the mix of browsers currently deployed support the best. Google Docs gzips their JS. The Google AJAX Libraries API CDN gzips JS. Yahoo gzips the JS for their…
avernet
  • 30,895
  • 44
  • 126
  • 163
2
votes
0 answers

How to get Chrome to show bytes or time remaining for content-encoded downloads

I'm writing an HTTP application that serves large files, and I would like web browser to show an estimate of time and/or bytes remaining. However, I would also like to use gzipped content-encoding, since the files are quite compressible, but would…
Michal Charemza
  • 25,940
  • 14
  • 98
  • 165
2
votes
0 answers

Unable to parse build.framework.js.br

I want to run my webgl app in laravel but I get this error while running How can I set the encoding into br? If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression…
Xerxes
  • 25
  • 3
2
votes
1 answer

Angular 5 Content Upload GZip

I am using Angular 5 on the client-side. I have some large text content that I need to upload to my server using my API. I am trying to pass the Content-Encoding: gzip header and send compressed contents to the server from Angular 5. I tried…
Narayanan
  • 105
  • 2
  • 7
2
votes
1 answer

Is Content-Transfer-Encoding an HTML header?

We are sending an automated email with mail's body in HTML format and we are receiving the email content twice in the body.Once with this header MIME-Version: 1.0 Content-Type: multipart/alternative; …
Gokul
  • 788
  • 2
  • 12
  • 30
1 2
3
10 11