Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9841

Upgrade spring mvc app to 3.1.2 causes content-type to be returned as 'application/*+xml'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.3, 3.2 RC1
    • Component/s: Web
    • Labels:
    • Last commented by a User:
      false

      Description

      I have a Spring mvc app that uses Spring 3.1.1. After upgrading to 3.1.2, this app now returns responses with content-type of 'application/*+xml', whereas previously it would return a content-type of 'application/xml' (nothing else changed).

      In both cases, the request contains the same Accept header of 'application/xhtml+xml'.

      Here is an example below:
      $ curl -H 'Accept: application/xhtml+xml' -v http://localhost:9000/hello/world

      • About to connect() to localhost port 9000
      • Trying 127.0.0.1... connected
      • Connected to localhost (127.0.0.1) port 9000
        > GET /hello/world HTTP/1.1
        > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
        > Host: localhost:9000
        > Accept: application/xhtml+xml
        >
        < HTTP/1.1 200 OK
        < Date: Fri, 28 Sep 2012 22:50:16 GMT
        < Content-Type: application/*+xml
        < Transfer-Encoding: chunked
        < Server: Jetty(7.6.3.v20120416)
      • Connection #0 to host localhost left intact
      • Closing connection #0
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?><hello/>

      Attached is a zip file containing a sample app exposing this problem.

        Activity

        Show
        rstoya05-aop Rossen Stoyanchev added a comment - Reproduction project: https://github.com/SpringSource/spring-framework-issues/tree/master/SPR-9841

          People

          • Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            vuillee Eric Vuillermet
            Last updater:
            Chris Beams
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              5 years, 8 weeks, 2 days ago