Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
4.7.0
-
None
-
None
-
Unknown
Description
Hi team,
while using URISupport.parseQuery the given query was not correctly decoded:
Sample JUnit test (org.apache.camel.util.URISupportTest):
@Test public void testParseQueryDFi() throws Exception { Map<String, Object> map = URISupport.parseQuery("Camel-Saga-Complete=direct%3A%2F%2Fsaga1_sagaService_complete"); assertEquals(1, map.size()); assertEquals("direct://saga1_sagaService_complete", map.get("Camel-Saga-Complete")); }
If i handover the query 'Camel-Saga-Complete=direct%3A%2F%2Fsaga1_sagaService_complete'
i expect the decoded value for 'Camel-Saga-Complete' as 'direct://saga1_sagaService_complete'.
I am wrong? Did i understand the utility class wrong?
Within the code i can see, that the string was adjusted to replace '%', this is
causing the issue:
URIScanner.addParameter:
if (isRaw) { text = value.toString(); } else { // need to replace % with %25 to avoid losing "%" when decoding final String s = replacePercent(value.toString()); text = URLDecoder.decode(s, CHARSET); }
best regards
Dirk
Attachments
Issue Links
- is related to
-
CAMEL-21216 Apache Camel LRA does not work with Oracle MicroTX LRA coordinator
- Resolved