ohmage / gwt-front-end

The javascript/GWT code behind the front end.
6 stars 2 forks source link

content-type headers missing for centos deployments #290

Closed jeroen closed 11 years ago

jeroen commented 11 years ago

All of the manual CentOS/Tomcat deployments are not returning the required content-type response headers for gwt/frontend files.

curl -v -X HEAD https://test.ohmage.org/web/
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Accept-Ranges: bytes
< ETag: W/"1390-1365440504000"
< Last-Modified: Mon, 08 Apr 2013 17:01:44 GMT
< Content-Length: 1390
< Date: Fri, 19 Apr 2013 19:45:36 GMT

Same for PNG:

curl -v -X HEAD https://test.ohmage.org/web/images/theme-ohmage/login-button-bg.png 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Accept-Ranges: bytes
< ETag: W/"2854-1365440504000"
< Last-Modified: Mon, 08 Apr 2013 17:01:44 GMT
< Content-Length: 2854
< Date: Fri, 19 Apr 2013 20:04:59 GMT

What should happen (ubuntu apache2 deployment):

curl -v -X HEAD https://pilots.ohmage.org/ohmage/ 
curl -v -X HEAD https://pilots.ohmage.org/ohmage/images/theme-ohmage/login-button-bg.png 

This problem goes often unnoticed because most browsers are smart enough to guess that the content is html from its contents, in spite of the missing header. However some older or more secured browsers, as well as proxies, caching services and mobile devices do rely on this header being set correctly. I recall we had fixed problem earlier specifically for css files?

jshslsky commented 11 years ago

Closing see cens/ohmageServer#569