- support Firefox
- runs on Resin 4.x server
- server is running on a Mac OS X
I just spent countless time on a very tiny problem.
Recently one of our project's resin server got upgraded from 3.x to 4.x, that breaks the security filter that we use (because Resin 4 now wrap the request). That is O.K. since the security filter is so out of date and we can solve it by using our own authenticator and the resin FormLogin tag.
Then after everything is working, I noticed if the site is opened in Firefox 4.0.1, it's plain, that is without any styling.
The CSS file is loaded properly though, the path is correct, it opens fine, the content type in response header is also correctly set to text/css.
I then even install the virtual machine, then Windows XP on it, then different versions of firefox by using firefoxportable, then check the site in those versions, not surprised, plain styling for all.
An interesting fact: if you use firebug and modify the css file (just by inserting a space), the entire site is colourful again, weird.
Accidently by checking the response header the countless number of times, one particular time the following caught my eyes: Content-Type: text/css; charset=MacRoman.
With this, I now have a more specific search term in Google and I got my answer in seconds. It turns out that Resin 4 has this bug.
I then tried to insert this in resin.xml with no luck:
One more search I found this is the line that does the trick:-Dfile.encoding=UTF-8
Hallelujah! Now I can go home early, enjoy a nice hot drink at home on a cold windy Friday afternoon. Happy weekend everyone :)
0 comments:
Post a Comment