httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uk Gannavarapu <uk.gannavar...@tcs.com>
Subject [users@httpd] Issue with cookie recognition with comma as delimiter
Date Wed, 15 Sep 2010 11:31:10 GMT
<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><DIV>Hi,
</DIV>
<DIV>&nbsp; </DIV>
<DIV>I am sending the <B style="COLOR: black; BACKGROUND-COLOR: #ffaaaa">cookie
</B>back to web server (appache <B style="COLOR: black; BACKGROUND-COLOR: #aaffaa">2
</B>. <B style="COLOR: black; BACKGROUND-COLOR: #aaffaa">2 </B>) ; it is
not <BR>getting recognized. <BR></DIV>
<DIV>Context: I'm trying to send a cookie back to webserver (as it is required for few
validations) as obtained from previous response, the cookie is not getting recognized. The
cookie preparation to set in the new&nbsp;request is explained as below. </DIV>
<DIV><BR><B style="COLOR: black; BACKGROUND-COLOR: #ffaaaa">Cookie </B>is
prepared in the below method, where variable <B style="COLOR: black; BACKGROUND-COLOR:
#ffaaaa">cookie </B>used contains <BR>all the cookies received in the header
from the response. <BR><BR>protected String prepareCookie() <BR>{ <BR>String
cookieValue = ""; <BR>for(int z=0; z&lt; <B style="COLOR: black; BACKGROUND-COLOR:
#ffaaaa">cookie </B>.size(); z++) <BR>{ <BR>KeyValueInfo keyValueInfo
= (KeyValueInfo) <B style="COLOR: black; BACKGROUND-COLOR: #ffaaaa">cookie </B>.get(z);
<BR>String key = (String)keyValueInfo.getKey(); <BR>String value = (String)keyValueInfo.getValue();
<BR>if(key.equalsIgnoreCase("Set- <B style="COLOR: black; BACKGROUND-COLOR: #ffaaaa">Cookie
</B>")) <BR>{ <BR>if(cookieValue.equals("")) <BR>{ <BR>cookieValue
= cookieValue + value; <BR>} <BR>else <BR>{ <BR>cookieValue = cookieValue
+ "," + value; <BR>} <BR>} <BR>} <BR>return cookieValue; <BR>}
<BR><BR>Now when I send this <B style="COLOR: black; BACKGROUND-COLOR: #ffaaaa">cookie
</B>it is not recognized , however if I replace <BR><B style="COLOR: black;
BACKGROUND-COLOR: #ffff80">comma </B>with <STRONG>semi-colon </STRONG>while
adding cookies in the above method it works <BR>fine. Let me know if there is any to
do solve this. I can't change the code <BR>of the client to prepare <B style="COLOR:
black; BACKGROUND-COLOR: #ffaaaa">cookie </B>to replace <B style="COLOR: black;
BACKGROUND-COLOR: #ffff80">comma </B>to <STRONG>semi-colon </STRONG>.
<BR><BR><BR>Thanks &amp; Regards,<BR>Uday Kiran Gannavarapu<BR>Tata
Consultancy Services<BR>Mailto: uk.gannavarapu@tcs.com<BR>Website: http://www.tcs.com<BR>____________________________________________<BR>Experience
certainty. IT Services<BR>Business Solutions<BR>Outsourcing<BR>____________________________________________<BR><FONT
face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2></DIV></FONT>
<DIV></DIV></font><pre style="white-space:normal">=====-----=====-----=====<br>Notice:
The information contained in this e-mail<br>message and/or attachments to it may contain
<br>confidential or privileged information. If you are <br>not the intended recipient,
any dissemination, use, <br>review, distribution, printing or copying of the <br>information
contained in this e-mail message <br>and/or attachments to it are strictly prohibited.
If <br>you have received this communication in error, <br>please notify us by
reply e-mail or telephone and <br>immediately and permanently delete the message <br>and
any attachments. Thank you<br><br><br></pre>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message