Kodi Community Forum
Cookie issue with playable stream url - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Cookie issue with playable stream url (/showthread.php?tid=149842)



Cookie issue with playable stream url - sphere - 2012-12-28

Hi,

not sure if this is a bug, should be a feature-request or if I miss something.

I am working on an music add-on and have problems with the xbmc internal cookie-handling on playable URLs.

The playable URLs look like:
Code:
http://server.domain/data.php?id=fooobaaar
Here is a wireshark http-dump from a non working XBMC playback:
Code:
HEAD /data.php?id=foooobaaar HTTP/1.1
User-Agent: XBMC/12.0-RC2 Git:20121219-74b907c (Windows NT 6.1;WOW64;Win64;x64; http://www.xbmc.org)
Host: <server.domain>
Accept: */*
Cookie: so=; lang=de; session=
Connection: keep-alive

HTTP/1.1 200 OK
Date: Fri, 28 Dec 2012 11:54:33 GMT
Server: Apache/2
X-Powered-By: PHP/5.3.16
Vary: Accept-Encoding
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
Content-Type: text/html

Notice the request-cookies, the cookie "session" is empty, this throws an exception in the data.php (Sure, this is an Backend-Bug, but the developer is not available), something about "session id is too short or contains illegal chars". This is also why the content-type is "text/html" instead of the correct content-type "audio/mpeg".

I have no idea how xbmc got the invalid cookie. The cookie or session is even not needed for playback.

I know about the possibility to inject additional request headers via the pipe-in-url-trick but it does not work, if I alter the playable url to something like:
Code:
http://server.domain/data.php?id=fooobaaar|Cookie=session%3Dany-valid-session-id%3B
the Request will be:
Code:
Cookie: so=; lang=de; session=; session=any-valid-session-id;
The "session" cookie is sent twice - which also raises the exception in the data.php.

Now the Question(s):
Is there any possibility for _overriding_ (instead of appending) cookies?
Is it an XBMC bug or should it be an additional feature?
Is there any other way to get the request out without the invalid or (only) with the correct cookie?

thanks,
sphere


RE: Cookie issue with playable stream url - vfranchi - 2015-04-24

Does anyone found a solution to this?
I have a similar problem.


RE: Cookie issue with playable stream url - Paxxi - 2015-04-27

See this https://github.com/xbmc/xbmc/pull/6777 for explanation and tracking of a possible fix


RE: Cookie issue with playable stream url - vfranchi - 2015-04-27

(2015-04-27, 19:09)Paxxi Wrote: See this https://github.com/xbmc/xbmc/pull/6777 for explanation and tracking of a possible fix

Are you sure this is the right issue? It appears to be an issue for 'fix for gamepad volume change'.


RE: Cookie issue with playable stream url - Paxxi - 2015-04-28

Meh, stupid browser. This is the one https://github.com/xbmc/xbmc/pull/7004