Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
3.0.0.RC2
-
None
-
None
-
Java 11 , Camel 3.0.0-RC2 , Camel-restlet-starter version 3.0.0-RC2
-
Unknown
Description
I tried to send an array of cookies at once to the browser, but I'm getting this error:
java.io.IOException: Empty cookie name detected. Please check your cookies
But the same code without any changes works just fine with "jetty", "undertow","servlet" ...
Parth of the code that I used for sending multiple cookies:
public Order getOrder(@Headers Map headers, @ExchangeProperties Map properties,Exchange exchange){
List<String> cookieList = new ArrayList<>();
cookieList.add("Key7001=Value7001;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;");
cookieList.add("Key7002=Value7002;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;");
// Sets the two cookies on the browser
headers.put("Set-Cookie",cookieList); /// this will return an error saying java.io.IOException: Empty cookie name detected. Please check your cookies
//Set with one cookie on the browser works just fine
//headers.put("Set-Cookie","Key6001=Value6001;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;");
I uploaded the full code in github: https://github.com/odehghan/camelrestlet
Attachments
Issue Links
- relates to
-
CAMEL-14060 Deprecate camel-restlet as its not active maintained
- Resolved