content-encoding

How can I pre-compress files with mod_deflate in Apache 2.x?

I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. This is something that, I believe, mod_gzip did in Apache 1.x automatically, but jus...

How to get the charset from an HTML page

Hi all, 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 attribute to return me anything different from us-ascii (even if the encoding is utf-8...

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

Hi there, 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 doesn't ever seem to actually do the encoding. None of the various encoding tec...

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? ...

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: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="nl"> <head> <meta ht...

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! ...

How do HTTP proxy caches decide between serving identity- vs. gzip-encoded resources?

An HTTP server uses content-negotiation to serve a single URL identity- or gzip-encoded based on the client's Accept-Encoding header. Now say we have a proxy cache like squid between clients and the httpd. If the proxy has cached both encodings of a URL, how does it determine which to serve? The non-gzip instance (not originally serve...

Transparently Handling GZip Encoded content with WWW::Mechanize

Hi, I am using WWW::Mechanize and currently handling HTTP responses with the 'Content-Encoding: gzip' header in my code by first checking the response headers and then using IO::Uncompress::Gunzip to get the uncompressed content. However I would like to do this transparently so that WWW::Mechanize methods like form(), links() etc work...

Media Encoding

I have to choose methods for digitizing and encoding media for a project which collects media from a variety of sources. What are the open media encoding standards I should consider? What could be the factors which affect my decision on the selection of one? Cheers Uchitha ...

How does server side GZipping work?

You might know that HTML related file formats are compressed using GZip compression, server side, (by mod_gzip on Apache servers), and are decompressed by compatible browsers. ("content encoding") Does this only work for HTML/XML files? Lets say my PHP/Perl file generates some simple comma delimited data, and sends that to the browser, ...

How can I accept gzip-compressed content using LWP::UserAgent?

I am fetching some pages over the Web using Perl's LWP::UserAgent and would like to be as polite as possible. By default, LWP::UserAgent does not seamlessly handle compressed content via gzip. Is there an easy way to make it do so, to save everyone some bandwidth? ...

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, the gzipped content is passing the GIDZipTest page (http://www.gidnetwork.com/tools/gzip-te...

Android: HTTP communication should use "Accept-Encoding: gzip"

I've a HTTP communication to a webserver requesting JSON data. I'd like compress this data stream with Content-Encoding: gzip. Is there a way I can set Accept-Encoding: gzip in my HttpClient? The search for gzip in the Android References doesn't show up anything related to HTTP, as you can see here. ...

How do I differentiate between request and response in an HTTPURLConnection?

Hi I need to evaluate if a server supports gzip compression. Therefore I want to set gzip as Accept-Encoding in my request and evaluate if the response of the server containts "Content-Encoding: gzip". However I am not quite clear on how to do this with HTTPURLConnection. Especially when to query my Connection object about the respons...

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 or remove the "Vary" header for the following resources: ... The question is Which ve...

In IIS7, gzipped files do not stay that way

I have configured IIS7 to gzip static content. http://www.coderjournal.com/2008/04/iis-7-compress-javascript-gzip/ However, the files don't "stay" gzipped. Here's my use case: Request test.css file. It is not gzipped. Request it again within a few seconds. It is gzipped. Wait 5 minutes. Request test.css file again. It is not gzipped...

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

Hey, 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 ? The website's encoding is with <META HTTP-EQUIV="Content-Type" CONTENT="text/h...

Encountering encoding issues on linux box, not Windows

I'm running into an encoding issue that has stumped me for a few weeks and nothing seems to work. I have a website that works fine on my local machine, but when I push the jsp files to a Linux box for review, characters that previously rendered fine are now displaying as funky characters. For some reason, some characters display just fi...

How can I check the content transfer encoding of incoming emails using Zend framework

How can I detect the content-transfer-encoding of emails in the inbox using Zend framework. I need to check to make sure whether a message is qyoted printable content so I can run a decode upon it somehow. The encoding doesn't appear in the message object that I get from using Zend_Mail_Imap_Storage::getMessage please help ...

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 problem is that often the content encoding of the existing web page is different than my web...