Results 1 to 2 of 2

Thread: Accept header resolution (text/plain; q=0.5, application/json)

  1. #1
    Join Date
    Nov 2007
    Posts
    17

    Default Accept header resolution (text/plain; q=0.5, application/json)

    We have started to use org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter and found out the following behavior. If the client sends Accept="text/plain; q=0.5, application/json" then the result has Content-type=text/plain. The cause is that MediaType.sortBySpecificity(mediaTypes) ignores "q" parameter if the types are different (text!=application).

    Is it a bug? It is certainly counterintuitive. If there is a reason behind this, could you please provide me with some link where this behavior is explained.

  2. #2
    Join Date
    Nov 2007
    Posts
    17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •