You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2019/10/16 14:24:00 UTC
[jira] [Resolved] (CAMEL-14059) camel-restlet can't send an array
of cookies at once for responce
[ https://issues.apache.org/jira/browse/CAMEL-14059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-14059.
---------------------------------
Resolution: Won't Fix
> camel-restlet can't send an array of cookies at once for responce
> -----------------------------------------------------------------
>
> Key: CAMEL-14059
> URL: https://issues.apache.org/jira/browse/CAMEL-14059
> Project: Camel
> Issue Type: Bug
> Components: camel-restlet
> Affects Versions: 3.0.0.RC2
> Environment: Java 11 , Camel 3.0.0-RC2 , Camel-restlet-starter version 3.0.0-RC2
> Reporter: Omid Dehghan
> Priority: Minor
>
> {color:#808080}I tried to send an array of cookies at once to the browser, but I'm getting this error: {color}
> {color:#808080} java.io.IOException: Empty cookie name detected. Please check your cookies{color}
>
> {color:#808080}But the same code without any changes works just fine with "jetty", "undertow","servlet" ... {color}
>
> Parth of the code that I used for sending multiple cookies:
> {color:#000080}public {color}Order getOrder({color:#808000}@Headers {color}Map headers, {color:#808000}@ExchangeProperties {color}Map properties,Exchange exchange){
> List<String> cookieList = {color:#000080}new {color}ArrayList<>();
> cookieList.add({color:#008000}"Key7001=Value7001;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;"{color});
> cookieList.add({color:#008000}"Key7002=Value7002;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;"{color});
> {color:#808080}// Sets the two cookies on the browser{color}
> headers.put({color:#008000}"Set-Cookie"{color},cookieList); {color:#808080}/// this will return an error saying java.io.IOException: Empty cookie name detected. Please check your cookies{color}
> {color:#808080}//Set with one cookie on the browser works just fine{color}
> {color:#808080} //headers.put("Set-Cookie","Key6001=Value6001;Path=/;HttpOnly=true;session-token=test;Expires=Thu, 06-Jan-2022 00:00:00 GMT;");{color}
>
> I uploaded the full code in github: [https://github.com/odehghan/camelrestlet]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)