Http headers

SS IPTV App for LG Smart TV discussion
Post Reply
mortegai
Ensign
Ensign
Posts: 12
Joined: 10 Mar 2016, 14:26
Spain

Http headers

Post by mortegai »

How I can add custom http headers (eg Referer) for a url in a playlist?

User avatar
Eugene
Project Leader
Project Leader
Posts: 5886
Joined: 15 Apr 2013, 22:54
TV Model: LG 47LM960V, LG LB679V
Location: Санкт-Петербург
Been thanked: 1 time
Contact:
Russia

Re: Http headers

Post by Eugene »

You can't if you don't have your own http-server. The info about headers is for operators, not for users.

mortegai
Ensign
Ensign
Posts: 12
Joined: 10 Mar 2016, 14:26
Spain

Re: Http headers

Post by mortegai »


User avatar
Eugene
Project Leader
Project Leader
Posts: 5886
Joined: 15 Apr 2013, 22:54
TV Model: LG 47LM960V, LG LB679V
Location: Санкт-Петербург
Been thanked: 1 time
Contact:
Russia

Re: Http headers

Post by Eugene »

:?:
I know nothing about Kodi or MX Player. I answer only the question about our app.
http headers can be added only on server-side, it is common rule, so if you don't have own http-server, you cannot add your own http-headers, no matter for Kody or for anything else.

mortegai
Ensign
Ensign
Posts: 12
Joined: 10 Mar 2016, 14:26
Spain

Re: Http headers

Post by mortegai »

I think the http headers are also used by clients in any http request.
For example:

Code: Select all

ffplay -headers $'User-Agent: Mozilla/5.0\r\nReferer: http://www.playerhd2.pw\r\n' http://cdn.sitenow.me/live/neox_alwkw2n/playlist.m3u8

You have this result (obtained with Wireshark):

Code: Select all

GET /live/neox_alwkw2n/playlist.m3u8 HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: close
Host: cdn.sitenow.me
Icy-MetaData: 1
User-Agent: Mozilla/5.0
Referer: http://www.playerhd2.pw


HTTP/1.1 206 Partial Content
Server: nginx
Date: Thu, 06 Oct 2016 14:11:47 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 125
Connection: close
Access-Control-Expose-Headers: Content-Length
Cache-Control: max-age=5
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Max-Age: 86400
Access-Control-Allow-Headers: Range
X-Cache-Status: EXPIRED
Content-Range: bytes 0-124/125

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=416329,CODECS="avc1.100.21,mp4a.40.2",RESOLUTION=512x288
chunklist.m3u8

As can be seen in the request (GET) http headers also are included, and in this case the application (ffplay, same as MX Player, Kodi, ...) admits be instructed the values for some of them.

From what you tell me, it seems that ss-iptv has no way to tell some http header to include in their requests.
In any case, thank you very much for your answers.

User avatar
Eugene
Project Leader
Project Leader
Posts: 5886
Joined: 15 Apr 2013, 22:54
TV Model: LG 47LM960V, LG LB679V
Location: Санкт-Петербург
Been thanked: 1 time
Contact:
Russia

Re: Http headers

Post by Eugene »

You should be more exact in questioning.
Your example is for non-browser requests (therefore User-Agent is set to "Mozilla"), it is not usual case.
Do not compare PC players and Smart TV players, most of Smart TV apps works as single-page site in browser's environment, so User-Agent and Referer cannot be substituted

Post Reply