Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-196

Duplicate request parameters after rewrite

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an issue
    • Neutral
    • None
    • 2.0.5
    • None
    • None

    Description

      Hello there,

      I'm not sure this bug is caused by Blossom, but some investigation with the Java debugger indicated that this is the best first guess. If I'm wrong, then sorry, please forward it.

      In order to reproduce, please add this class to any Blossom project:

      @Controller
      @Template(id=DummyTemplate.TEMPLATE_ID, title="Dummy Page")
      @RequestMapping(value="/dummypage")
      public class DummyTemplate
      {
      	public static final String TEMPLATE_ID="rr:pages/dummypage";
      	
      	@RequestMapping(method=RequestMethod.GET)
      	public @ResponseBody String handleRequest(HttpServletRequest request, @RequestParam(value="dummyparam") String dummyParam)
      	{
      		return "dummy param value: '"+dummyParam+"'";
      	}
      }
      

      Now create a website called /dummy.html having this template and open
      /dummy.html?dummyparam=xyz
      in your browser.
      It prints this:
      dummy param value: 'xyz'
      This is correct.

      Now, please create rewrite rule like this:
      class: info.magnolia.cms.beans.config.RegexpVirtualURIMapping
      fromURI: /dummy2((?.*)?)$
      (Please mind the backslash, Jira is not displaying it correctly unless in source view. I don't know how to escape it correctly)
      toURI: forward:/dummy.html$1

      Then open
      /dummy2?dummyparam=xyz
      in your browser.
      It should also print:
      dummy param value: 'xyz'
      However it prints this:
      dummy param value: 'xyz,xyz'
      Which is the bug.

      Thanks for looking into it.

      PS: Platform is Tomcat 8 here. If this changes anything.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              tmattsson Tobias Mattsson
              tln TLN
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD