[BLOSSOM-196] Duplicate request parameters after rewrite Created: 26/Nov/14 Updated: 28/Nov/14 Resolved: 28/Nov/14 |
|
| Status: | Closed |
| Project: | Blossom |
| Component/s: | None |
| Affects Version/s: | 2.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | TLN | Assignee: | Tobias Mattsson |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| 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 Now, please create rewrite rule like this: Then open Thanks for looking into it. PS: Platform is Tomcat 8 here. If this changes anything. |
| Comments |
| Comment by TLN [ 27/Nov/14 ] |
|
Hi again, it has shown now that this is not a bug but unexpected rewrite behaviour: Although you can match URL parameters in your regex and you can append them to the rewritten URL, any incoming GET parameters are already automatically passed on, so if you do that again as part of your rule, you get duplicates. This can be closed, please. |
| Comment by Tobias Mattsson [ 28/Nov/14 ] |
|
This is standard servlet container behavior. When you forward with a query string those parameters are added to those already present. Modify your regex so it doesnt add the query string. |