-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
This is actually an issue with the `RelativePathAttribute`, but it is most obvious when using it via the rewrite() handler. Consider a URL like so:
/old/path?foo=bar
When using the rewrite() handler that includes query string like so:
rewrite( '/new/path?baz=bum' )
the `RelativePathAttribute` attempts to keep the exchanges query params and query string in sync, but it does so poorly. Dumping out that request will reveal the following
parameter=foo=bar parameter=baz=bum queryString=foo=bar
The query string has been replaced with JUST the new query string from the rewrite() handler, yet the query parameter map in the exchange has been APPENDED to include both the new and the old parameters. This is a similar but different issue to the ticket I logged here: UNDERTOW-2358
This behavior causes issues with servlet apps that use the query string from the servlet request directly.
If the correct behavior is to discard the old query string, then the query parameter map needs overwritten, not appended to. I'll be putting in another ticket soon to add a qsAppend flag to the rewrite handler.
- is related to
-
UNDERTOW-2358 QueryParameterAttribute doesn't update query string in exchange
- Open
- relates to
-
UNDERTOW-2360 Add qsappend flag to rewrite() handler
- Open