When HttpRequestHandlingEndpointSupport receives an HTTP request, it reads the Accept-Charset HTTP header and extracts all the charset strings the client submitted. These strings are then converted into associated java.nio.charset.Charset instances. This happens in the getAcceptCharset() in the class org.springframework.http.HttpHeaders.
However, if the clients submits an accepted charset which does not have an associated Charset instance on the server, say "foobar", the getAcceptCharset() method fails miserably and throws a java.nio.charset.UnsupportedCharsetException.
What the method should do instead is to handle this case gracefully. You cannot control the Accept-Charset header the client sends anyway and have do deal with broken stuff, too. A possible solution would be to simply ignore those particular accepted charsets. The server won't be able to create a response using one of them anyway.