title: Issue with restcontroller and application/x-www-form-urlencoded;charset=UTF-8 media type
body: <p>Task is trivial
  client sends request using POST with application/x-www-form-urlencoded media type. Server receives and response with status OK. But looks like there is difference between media type <strong>application/x-www-form-urlencoded</strong> and <strong>application/x-www-form-urlencoded;charset=UTF-8</strong></p>
  
  <p>Server part:</p>
  
  <pre><code>@Slf4j
  @Controller
  @RequestMapping(produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
  public class CallbackController {
  
  @RequestMapping(value = "/callback/", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
      public ResponseEntity&lt;?&gt; callback(HttpServletRequest servletRequest, @RequestBody RequestEntity&lt;?&gt; body) throws IOException {
          log.info("Hello: {}", servletRequest);
          log.info("Hello: {}", body);
          String s = extractPostRequestBody(servletRequest);
          log.info("Hello: {}", s);
          return new ResponseEntity&lt;Object&gt;(HttpStatus.OK);
      }
  }
  </code></pre>
  
  <p>Client part:</p>
  
  <pre><code>public void sendcallback() throws IOException {
          RestTemplate restTemplate = new RestTemplate();
          String url = "http://localhost:8082/callback/";
          MultiValueMap&lt;String, String&gt; headers = new LinkedMultiValueMap&lt;String, String&gt;();
          headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
          headers.add(HttpHeaders.ACCEPT_CHARSET, "UTF-8");
          headers.add(HttpHeaders.ACCEPT, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
          headers.add(HttpHeaders.USER_AGENT, "uuuuuuuuuuser");
          headers.add(HttpHeaders.AUTHORIZATION, "none");
  MultiValueMap&lt;String, String&gt; body = new LinkedMultiValueMap&lt;String, String&gt;();
          List&lt;String&gt; val1 = new ArrayList&lt;&gt;();
          val1.add("valllll");
          body.put("val", val1);
          HttpEntity&lt;?&gt; entity= new HttpEntity&lt;&gt;(body, headers);
          ResponseEntity&lt;?&gt; result = restTemplate.exchange(url, HttpMethod.POST, entity, Object.class);
          log.info("response: {}", result);
      }
  </code></pre>
  
  <p>the result output at client side, request:</p>
  
  <pre><code>"POST /callback/ HTTP/1.1[\r][\n]"
  "Content-Type: application/x-www-form-urlencoded[\r][\n]"
  "Accept-Charset: UTF-8[\r][\n]"
  "Accept: application/x-www-form-urlencoded[\r][\n]"
  "User-Agent: uuuuuuuuuuser[\r][\n]"
  "Authorization: none[\r][\n]"
  "Content-Length: 11[\r][\n]"
  "Host: localhost:8082[\r][\n]"
  "Connection: Keep-Alive[\r][\n]"
  "Accept-Encoding: gzip,deflate[\r][\n]"
  "[\r][\n]"
  "val=valllll"
  </code></pre>
  
  <p>response:</p>
  
  <pre><code>"HTTP/1.1 405 Method Not Allowed[\r][\n]"
  "Server: Apache-Coyote/1.1[\r][\n]"
  "Allow: GET, HEAD[\r][\n]"
  "Content-Language: ru-RU[\r][\n]"
  "Content-Length: 0[\r][\n]"
  "Date: Tue, 11 Aug 2015 06:28:41 GMT[\r][\n]
  "[\r][\n]"
  </code></pre>
  
  <p>and server in debug mode tell me interesting thing:</p>
  
  <p><a href="https://i.stack.imgur.com/2GfdT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2GfdT.png" alt="enter image description here"></a></p>