Description of problem: This problem was first discovered when running RESTEasy testsuite as test org.jboss.resteasy.test.providers.jaxb.regression.TestBadContentType.testHtmlError in jaxb providers was occasionally failing. One way of choosing appropriate jaxb provider for (un)marshalling data is defining request accept header (simulated in mentioned test). This works fine for valid accept header such as text/xml. However if invalid accept header is provided (header for which there is no suitable provider) such as text/html instead of receiving response status 500 (no suitable provider was found) somewhere on the way to server content type is replaced by */* and first matching provider is used (response is 200). Version-Release number of selected component (if applicable): RESTEasy 2.3.5.Final and RESTEasy 2.3.6. How reproducible: I have created a simple web project simulating this problem where accept header can be provided and corresponding response observed. Steps to Deploy: 1. Clone project from github: git clone https://github.com/badassviking/resteasy-mimetest.git 2. Start Jboss-As: JBOSS_HOME/bin/standalone.sh 3. Deploy application from cloned repo: mvn clean package jboss-as:deploy 4. Application will be running on the following url: http://localhost:8080/ResteasyMimeTest/ (port might be different) Steps to Reproduce: 1. Enter text/html in Accepts 2. Enter */* in Accepts 3. Enter foo/bar in Accepts Actual results: 1. Response Status: OK, Content-Type: [*/*] 2. Response Status: OK, Content-Type: [*/*] 3. Response Status: OK, Content-Type: [*/*] Expected results: 1. Response Status: 500 Could not find MessageBodyWriter for response object of of media type: text/html 2. Response Status: OK, Content-Type: specific type like text/xml or application/xml based on used provider 3. Response Status: 500 Could not find MessageBodyWriter for response object of of media type: foo/bar Additional info:
Verified that RESTEasy 3.0.5.Final fixed this issue.
Do we have to fix this in Branch_2_3? I propose we mark it as "won't fix".
EAP7 + RESTEasy 3.x will fix this problem.