Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

PNG being scanned as HTML #26

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments
Closed

PNG being scanned as HTML #26

GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

From: 
http://groups.google.com/group/mod-pagespeed-discuss/browse_thread/thread/2a909b
19159dfd37

>> [Thu Nov 04 14:29:39 2010] [error] [1104/142939:ERROR:net/instaweb/
util/google_message_handler.cc(54)] http://localhost/(PHP-generated
image request):1: Reached end of document without finding <body>
>>
>> I'm sure some of these could be fixed with some tweaking to the
configuration, but I thought I'd still put these in case it can be
helpful to the developers working on the module.

> Are you saying that you requested an image and it gave you this error 
message? That's good to know. It means that it was parsing that image as an 
html doc! I believe we choose which files to rewrite based on MIME type 
reported by Apache, do you think there would be any reason that this would have 
been reported as text/html or anything like that?

Thanks for your explanation of the error messages. The images are
generated in PHP and are loaded using a url ending in .php, but I set
the content-type HTTP header to image/png, so it shouldn't be an
issue.
Here are the response headers for one of the images that resulted in
the above error:

 Date   Fri, 05 Nov 2010 14:01:00 GMT
 Server Apache/2.2.16 (Ubuntu)
 X-Powered-By   PHP/5.3.3-1ubuntu9.1
 Last-Modified  Thu, 28 Oct 2010 14:01:40 GMT
 Content-Length 19548
 Content-Disposition    inline; filename="4.8_4896_7353x_4847_7305y.png"
 Cache-Control  max-age=7776000
 Expires        Thu, 03 Feb 2011 14:01:00 GMT
 Content-Type   image/png; charset=binary
 Vary   Accept-Encoding

Original issue reported on code.google.com by sligocki@google.com on 5 Nov 2010 at 3:32

@GoogleCodeExporter
Copy link
Author

Do you know if the response-headers are set by mod_headers, which typically 
runs downstream of mod_pagespeed?  Or are they set in PHP which I'm assuming 
runs upstream?

Original comment by jmara...@google.com on 5 Nov 2010 at 6:28

@GoogleCodeExporter
Copy link
Author

Issue 54 has been merged into this issue.

Original comment by jmara...@google.com on 9 Nov 2010 at 3:04

@GoogleCodeExporter
Copy link
Author

From duplicate Issue 54 :

Image that is triggering the problem:
   http://www.html.de/wiki/index.php?title=images/buttons/collapse_40b.png
URL that this image is embedded in:
   http://www.html.de/wiki/

Original comment by jmara...@google.com on 9 Nov 2010 at 3:04

@GoogleCodeExporter
Copy link
Author

Referring to your question:

Our response headers are set by the PHP script. Not sure what the execution 
order is in terms of chained modules.

Original comment by fxres...@gmail.com on 9 Nov 2010 at 3:27

@GoogleCodeExporter
Copy link
Author

Original comment by jmara...@google.com on 13 Nov 2010 at 2:32

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 17 Nov 2010 at 12:50

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant