I have a PreMatching filter that attempts to set query parameters using #setRequestUri(). However, doing this causes CXF to always return 404 and never set the new query parameters.
Then only exception to this was when the original URI both had no query parameters and ended without an slash.
I have a little test to show what I mean:
I also have a proposed fix: