NetTalk Central

Author Topic: No SessionID for a REST response  (Read 3791 times)

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
No SessionID for a REST response
« on: January 20, 2017, 03:21:24 PM »
So i have my webservice  mostly  RESTful now,
The only bit of house keeping i would like to do is not set the SESSIONID cookie.
I can delete the cookie in my webservice method but it leaves an artifact in the Response
is there a way to prevent the "Set-Cookie: SESSIONID ..." from ever happening?


Code: [Select]
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2017 23:04:43 GMT
Server: NetTalk-WebServer/9.13
Content-Length: 4308
Content-Encoding: gzip
Content-Type: application/json
Set-Cookie: SESSIONID=; expires=Tue, 07 Apr 1801 05:00:00 GMT;; path=/
Connection: close
X-Frame-Options: sameorigin

ie Never appear in the response header
Code: [Select]
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2017 23:04:43 GMT
Server: NetTalk-WebServer/9.13
Content-Length: 4308
Content-Encoding: gzip
Content-Type: application/json
Connection: close
X-Frame-Options: sameorigin

poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: No SessionID for a REST response
« Reply #1 on: January 23, 2017, 12:50:57 AM »
Hi Poul,

There's no method to remove a single cookie from the cookie queue, but this should work

Free(p_web._CookieQueue)

Cheers
Bruce

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: No SessionID for a REST response
« Reply #2 on: January 23, 2017, 12:58:52 PM »
Yes that appears to do the trick.

thanks
poul