Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Cookie processing

Forum

Search UsersRules
Cookie processing
#1
Interested
Points:: 15
Joined:: Oct 27, 2011

When the server returns more than  one line of cookie string 1c merges 2 strings so it is difficult to read cookie values. Shouldn't it be presented with 2 lines? O with the map?

Example

Code
HTTP/1.1 200 OK
Date: Wed, 20 Jul 2016 00:18:04 GMT
Server: Apache
Set-Cookie: JSESSIONID=Ph6AFBXDkVASoA2bNO+HY7Ky.sriinternet05i1; Path=/facturacion-internet; Secure
X-Powered-By: JSP/2.2
Cache-Control: max-age=600
Expires: Wed, 20 Jul 2016 00:28:04 GMT
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: BIGipServerDeclaraciones_sri.gob.ec=186515722.47873.0000; path=/; Httponly; Secure

Profile
#2
Interested
Points:: 15
Joined:: Oct 27, 2011

For those who would probably face the same problem start your code with:

Code
   CookieString = StrReplace (CookieString, ", ", "; ");


This should change comma to a semicolon standard separator, aunque if there is comma inside cookie value it will provoke error.

Profile
#3
Guest
Points::
Joined::

Hello, Alexey!

Do you mean that when you are making a HTTP request to some site, this site receives cookie with values separated by comma, not semicolon?

Profile
#4
Interested
Points:: 15
Joined:: Oct 27, 2011

Hello Timofey,

No. If I make a HTTP request to some site it could return Set-cookie header in response. So to make a following request I need to pass received cookies.
One site returns 2 lines of Set-cookie headers (I could see it with debugging proxy, in my post above) but 1C:Enterprise merges these string into one with the comma between two parts, not semicolon.
I do not know if modern version of platform still have this behavior, but as of 8.3.6. it does.I would suggest to replace comma with semicolon inside the platform.

p.s. It seems like one Set-cookie is from Java and another one from load balancer, so it could be common.

Profile
#5
Guest
Points::
Joined::

Hello, Alexey.

Could you please create a sample configuration where I could reproduce this issue and a list of actions to reproduce it. And if on 8.3.8 it is still the same, I will submit the error description to the developer team.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.