Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-8410 Content negotiation improvements
  3. SPR-7632

Allow valid file extension paths for content negotiation to be specified

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.6
    • Fix Version/s: 3.2 M2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Allow valid file extension paths to be specified in DispatcherServlet. My use case is

      @RequestMapping(value = "/jobs/{jobName}", method = RequestMethod.GET)
      

      I need .html and .json to be valid extensions (stripped off by the dispatcher), but other . separated jobName values are legal and should be presented as they are (e.g. my.job or my.job.html both resolve to my.job).

      The current behaviour is simply to truncate at the first period. Even with a regex pattern {{

      {jobName:.*}

      }} we truncate the path, so the only way to make it work is to add HttpServletRequest to all controller methods and extract the parameter manually (back to Spring 2.5).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                david_syer Dave Syer
                Last updater:
                Brian Clozel
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 37 weeks, 6 days ago

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.25d
                  0.25d
                  Remaining:
                  Remaining Estimate - 0.25d
                  0.25d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified