gruntjs / grunt-contrib-connect

Start a static web server.
http://gruntjs.com
MIT License
714 stars 146 forks source link

Character encoding is changed to UTF-8 when downloading pdf #145

Open misja-alma opened 9 years ago

misja-alma commented 9 years ago

I'm encountering an issue when downloading pdf's in my application. When I open them in my browser, they sometimes open blank. After some searching I found out why: the character encoding is sometimes changed to UTF-8, and this corrupts the downloaded pdf. It only happens when I download the pdf's through grunt-connect-proxy, not otherwise.

Some searching on the Internet reveals that I'm not the only one experiencing this problem with grunt-connect-proxy, see for instance the issue: https://github.com/drewzboto/grunt-connect-proxy/issues/73#issuecomment-59532082 It also doesn't seem to be specific for PDF's, it can affect .gz files as well.

The culprit seems to be grunt-contrib-connect, which is used by grunt-connect-proxy.

Is this a bug, or is this dynamic character encoding a feature which I can turn off? Any help is greatly appreciated!