-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Francois Félicien opened SPR-9142 and commented
I get a similar to #12368 issue but on 3.1 GA and on a different code line.
The following exception is thrown when The Accept header of the request does not contains any slash (mostly due to blackberry browser)
java.lang.IllegalArgumentException: "01" does not contain '/'
at org.springframework.http.MediaType.parseMediaType(MediaType.java:640)
at org.springframework.http.MediaType.parseMediaTypes(MediaType.java:683)
at org.springframework.http.HttpHeaders.getAccept(HttpHeaders.java:149)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.getAcceptableMediaTypes(AbstractMessageConverterMethodProcessor.java:178)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:104)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:81)
at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:94)
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:73)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.alvarum.server.channels.screen.framework.processing.ExceptionsStoppingAndLoggingFilter.doFilter(ExceptionsStoppingAndLoggingFilter.java:44)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
According to the comments of the issue #12368, it should either send a 406 response code or return null for ViewResolver chaining.
Affects: 3.1 GA
Sub-tasks:
- Backport "Invalid MIME-type causes a 500 error" [SPR-9148] #13786 Backport "Invalid MIME-type causes a 500 error"
- Backport "Invalid MIME-type causes a 500 error" [SPR-9699] #14333 Backport "Invalid MIME-type causes a 500 error"
Issue Links:
- Accept header with quoted parameter causes IllegalArgumentException in HttpHeaders.getContentType for the outputMessage [SPR-8917] #13557 Accept header with quoted parameter causes IllegalArgumentException in HttpHeaders.getContentType for the outputMessage
- IllegalArgumentException parsing several Accept header variations [SPR-9693] #14327 IllegalArgumentException parsing several Accept header variations
Referenced from: commits 83ac44d
0 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug