Skip to content

Follow up #2150: Special chars in values of query strings #2191

Open
@raman-m

Description

@raman-m

Follow up #2150

Special chars in values of query strings

A 3rd additional test case:

-    [InlineData("api/debug()")] // no query
-    [InlineData("api/debug%28%29")] // encoded debug()
+    [InlineData("api/debug()?special=(\\,*,+,?,|,{,},[,],(,),^,$,.,#, ,)&2=(2)&3=[3]&4={4}")] // with query

The third test has revealed issues within the middleware logic, indicating that this test case is likely to fail. The MergeQueryStringsWithoutDuplicateValues method struggles to handle URLs containing query strings with special characters, such as Regex patterns and reserved URL specification characters. This issue became apparent in release 20.0.0 during the refactoring of the MergeQueryStringsWithoutDuplicateValues method, which aimed to integrate existing and new logic (for example OData filters in query parameters, with bug fixes, with new feature for query string placeholders). Regrettably, the method fails to process special characters in parameter values.

Originally posted by @raman-m in #2150 (comment)

Subject

Metadata

Metadata

Assignees

Labels

RoutingOcelot feature: RoutingSpring'25Spring 2025 releasebugIdentified as a potential bug

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions