Issue Type: Feature Request Feature Request
Affects Versions: 1.0.0
Assignee: Unassigned
Components: controller
Created: 04/Apr/13 4:42 PM
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

Environment: Local/Eclipse and OpenShift
Project: AeroGear
Labels: aerogear controller
Priority: Major Major
Reporter: Nick Powers
Security Level: Public (Everyone can see)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira