Thread Rating:
  • 1 Vote(s) - 5 Average
HTTP Cookies and Sessions Since v17 Beta 3
#1
In a PVR binary addon (pvr.zattoo), I'm using XBMC->CURLOpen(..) to communicate with the stream provider. On a specific request, the provider sets a session cookie which is used to identify the current session.

Earlier, this cookie was saved to cookies.dat and re-used over all future calls to the same host. Now since Beta 3, this cookies.dat has been removed. In general, this will simplify the addon as it does not have to store any session related date on the file system.
But now my problem is, that this session cookie is persisted for some time (less than a minute) and then it is dropped. Probably as soon as the HTTP connection is actually closed. As soon as this happens, the client is not logged in anymore and a bunch of requests are required to re-login.

Is this the expected behaviour?
If yes, how could I handle that? Is it possible to receive the cookies from the addon to resend them later?
If no, is this already on the list or shall I create a ticket?
Reply
#2
I just tried this again with the current Krypton-Version. The cookie handling still seems to be weird. The Cookie retrieved by the first request is used for some requests but lost after some time.

Is there a way for the addon to retrieve the cookie and make sure it is sent for every following request?
Reply
#3
Can someone please give an answer?
We are unable to watch live tv with our provider on our favourite platform(KODI) because of this!!!
C'mon guys!
Reply
#4
(2017-04-21, 11:49)qGCWiAQd Wrote: Can someone please give an answer?
We are unable to watch live tv with our provider on our favourite platform(KODI) because of this!!!
C'mon guys!

I can confirm, that your question is really importantWink

Otherwise we are not able to build new PVR-/Video Addons for our legal and payed Zattoo-TV Accounts.

So, please give support to @indri, if possible. THANKX!!!

Cheers
Mark
Reply
#5
+1
We in the EU can unfortunately no longer use the pvr-zattoo addon. Sad
It would be really nice if a developer could look at the once.
Reply
#6
I might have found the cause of this behaviour:

From https://curl.haxx.se/libcurl/c/CURLINFO_COOKIELIST.html
Quote:Since 7.43.0 cookies that were imported in the Set-Cookie format without a domain name are not exported by this option.

The provider does actually use SET-COOKIE without "DOMAIN="

I suspect this is the purpose why the cookies are not kept across http sessions. Can anyone confirm that?


In case of using curl directly, the workaround is to read the headers manually and extract the required cookie. Is that somehow possible through the C-Addon-API?
Reply



HTTP Cookies and Sessions Since v17 Beta 351