<meta charset="utf-8"> breaks the opera browser #360

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 8 comments

Comments

Projects
None yet
1 participant
What steps will reproduce the problem?
1. Make a new webpage with the following meta tag: <meta charset="utf-8">
2. Upload the file to your server with the standard Mod Page Speed 
configuration loaded.
3. Open the website in the Opera browser

What is the expected output?
You should see the simple website you've just created.

What do you see instead?
Opera asks you to download the source code as a file.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
X-Mod-Pagespeed: 0.10.19.4-1209

On what operating system?
Windows Vista

Which version of Apache?
Apache version 2.2.3

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.
I've made a simple demo. You can find it at: http://www.tgq.nl/
Remember to open the site with Opera. In other browsers it just works fine.

Original issue reported on code.google.com by pieter...@gmail.com on 8 Dec 2011 at 3:36

We will take a look but we don't have a lot of experience with Opera yet.

Can you try putting this in your pagespeed.conf:
  ModPagespeedDisableFilters convert_meta_tags


Original comment by jmara...@google.com on 8 Dec 2011 at 3:43

I suspect issue 358 may be the same thing?

Original comment by morlov...@google.com on 8 Dec 2011 at 3:47

[deleted comment]
Issue 358 doesn't show the error here.
After adding: ModPagespeedDisableFilters convert_meta_tags to the 
pagespeed.conf file and restarting Apache it now works fine.

Original comment by pieter...@gmail.com on 8 Dec 2011 at 3:55

It's clearing the Content-Type header:

Content-Type: ; charset=utf-8


$ curl -v http://www.tgq.nl/?ModPagespeed=off
* About to connect() to www.tgq.nl port 80 (#0)
*   Trying 178.79.132.91... connected
* Connected to www.tgq.nl (178.79.132.91) port 80 (#0)
> GET /?ModPagespeed=off HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
> Host: www.tgq.nl
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 08 Dec 2011 15:58:58 GMT
< Server: Apache/2.2.3 (CentOS)
< Last-Modified: Thu, 08 Dec 2011 14:48:10 GMT
< ETag: "422a6-17f-c1d05e80"
< Accept-Ranges: bytes
< Content-Length: 383
< Vary: Accept-Encoding,User-Agent
< Connection: close
< Content-Type: text/html; charset=UTF-8
< 
<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>TGQ.NL</title>  
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1">
</head>  

<body>  
<p>tgq.nl</p>
<p>Nothing here!</p>
</body>
* Closing connection #0
</html>


$ curl -v 
"http://www.tgq.nl/?ModPagespeed=on&ModPagespeedFilters=convert_meta_tags"
* About to connect() to www.tgq.nl port 80 (#0)
*   Trying 178.79.132.91... connected
* Connected to www.tgq.nl (178.79.132.91) port 80 (#0)
> GET /?ModPagespeed=on&ModPagespeedFilters=convert_meta_tags HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
zlib/1.2.3.3 libidn/1.15
> Host: www.tgq.nl
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 08 Dec 2011 16:00:45 GMT
< Server: Apache/2.2.3 (CentOS)
< Accept-Ranges: bytes
< X-Mod-Pagespeed: 0.10.19.4-1209
< Cache-Control: max-age=0, no-cache, no-store
< X-UA-Compatible: IE=edge,chrome=1
< Vary: Accept-Encoding
< Content-Length: 383
< Connection: close
< Content-Type: ; charset=utf-8
< 
<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>TGQ.NL</title>  
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1">
</head>  

<body>  
<p>tgq.nl</p>
<p>Nothing here!</p>
</body>
* Closing connection #0
</html>

Original comment by sligocki@google.com on 8 Dec 2011 at 4:03

You could also try removing the meta tag itself and leaving the filter enabled. 
 Since you're already putting the content type in the headers, putting it in a 
meta tag is redundant.

Meanwhile, I'm working on a fix.

Original comment by nfor...@google.com on 8 Dec 2011 at 4:10

Original comment by nfor...@google.com on 9 Dec 2011 at 11:50

  • Changed state: Fixed
Fixed in 0.10.19.x

Original comment by matterb...@google.com on 26 Jan 2012 at 3:15

  • Added labels: release-note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment