barnacs / compy

HTTP/HTTPS compression proxy
ISC License
204 stars 34 forks source link

Compy goes wrong when compressing some images, which makes the images unable to load. #63

Open Web-Distortion opened 3 years ago

Web-Distortion commented 3 years ago

Description: Compy goes wrong when compressing some images, which makes the images unable to load.

Reason: This is because Compy uses the content-type'' field in the HTTP response header to judge the type of the file. When some websites mistake thecontent-type'', Compy goes wrong!

Suggested fix: A typical solution to this big is that Compy should judge the file type from the content (e.g., the header of the file) rather than merely using the content type.