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

MatrixVariable values are not decoded

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2 GA
    • Fix Version/s: 3.2.1
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Assume the following handler method declaration:

       @RequestMapping("path{filter}")
       String handle(@PathVariable String filter, @MatrixVariable String mvar, @RequestParam String query) {
        // ...  
       }
      

      Assume also a RequestMappingHandlerMapping that has urlDecode and removeSemicolonContent set to false.

      Now when a request for "path;mvar=a%2fb?query=c%2fd" is made, it results in the confusing situation where both filter and query are decoded (to ";mvar=a/b" and "c/d" respectively) yet mvar is left undecoded (set to "a%2fb").

      This greatly diminishes the usefulness of SPR-9098 in connection with matrix variables.

      Of course there is a problem of the matrix part of the URL containing an encoded comma, semicolon or equals sign. These should probably not be interpreted in such situations as separators, but as belonging to the variable value. So the decoding would have to happen after the splitting. But the fact that it is not done at all looks confusing and inconsistent.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                mpol Michał Politowski
                Last updater:
                Rossen Stoyanchev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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