|
Description:
|
When checking http headers against what is defined in produces in a route, the DefaultRoute.java class doesn't appear to take q=x into consideration. For example, an accept header can look like so:
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
When DefaultRoute is looking in here, it splits on comma (',') and leaves in the q=x value (i.e. text/html;q=0.9). So it will check if (in produces) test/html = test/html;q=0.9 and fail the comparison. This comparison is done in matchesProduces in org.jboss.aerogear.controller.router.DefaultRoute. It also doesn't appear to handle "image/*", ideally that should match "image/png", "image/jpg", etc. This is causing some 404 returns from the controller.
A good reference: http://www.gethifi.com/blog/browser-rest-http-accept-headers
|