Description
If client send an empty Content-Type headers CXF REST runtime throws java.lang.IndexOutOfBoundsException because list in string 122 (JAXRSInInterceptor.java) is emty
// Content-Type
String requestContentType = null;
List<String> ctHeaderValues = protocolHeaders.get(Message.CONTENT_TYPE);
if (ctHeaderValues != null)
Stack trace:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0<br /> at java.util.ArrayList.rangeCheck(ArrayList.java:635)<br /> at java.util.ArrayList.get(ArrayList.java:411)<br /> at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:122)<br /> at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)<br /> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)<br /> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)<br /> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243)<br /> at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)<br /> at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)<br /> at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)<br /> at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)<br /> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:290)<br /> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doDelete(AbstractHTTPServlet.java:220)<br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)