HTTP: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ulion
No edit summary
m (Text replacement - "{{mininav| Media sources | File sharing }}" to "{{mininav| File sharing }}")
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<section begin="intro"/>XBMC contains an [[w:HTTP|HTTP]]-client with which you can add sources in all sections in the XBMC interface.<section end="intro"/>
{{mininav| [[File sharing]] }}
<section begin="intro"/>Kodi contains an [[w:HTTP|HTTP]]-client with which you can add sources in all sections in the Kodi interface.<section end="intro"/>


==HTTP/HTTPS url format==
== HTTP/HTTPS url format ==
XBMC supported normal http/https urls, additionally, it support optional options we called as 'protocol options' which user/addons can set so that xbmc can full simulate the browser operations with specified http request header values.
Kodi supported normal http/https urls, additionally, it support optional options we called as 'protocol options' which user/addons can set so that Kodi can full simulate the browser operations with specified http request header values.
* normal http url format:
* normal http url format:
   http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d
   http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d
Line 9: Line 10:
   http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d'''|option1=value1&option2=value2'''
   http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d'''|option1=value1&option2=value2'''


===XBMC Supported special http protocol options===
=== Kodi supported special http protocol options ===
* auth
* auth
which is required if your HTTP server uses any type of authentication other than basic (which is, in fact, unsafe unless used over HTTPS). E.g. if your HTTP server uses digest authentication, use <code><nowiki>http://username:password@host:port/directory/|auth=digest</nowiki></code>. For maximum flexibility, use <code>auth=any</code> or <code>auth=anysafe</code> (i.e. anything other than basic).
which is required if your HTTP server uses any type of authentication other than basic (which is, in fact, unsafe unless used over HTTPS). E.g. if your HTTP server uses digest authentication, use <code><nowiki>http://username:password@host:port/directory/|auth=digest</nowiki></code>. For maximum flexibility, use <code>auth=any</code> or <code>auth=anysafe</code> (i.e. anything other than basic).


* seekable (13.0+ Gotham, since git bb79b32b)
* seekable (13.0+ Gotham, since git bb79b32b)
when the media url is unseekable, addons can set <code>seekable=0</code> protocol options, then xbmc won't try to seek on that url.  
when the media url is unseekable, addons can set <code>seekable=0</code> protocol options, then Kodi won't try to seek on that url.  
if you set it in frodo or earlier, it will add a http header '<code>seekable: 0</code>' in the http request, it's harmless.
if you set it in frodo or earlier, it will add a http header '<code>seekable: 0</code>' in the http request, it's harmless.


===Other http protocol options (they are all rfc defined http request headers)===
=== Other http protocol options (they are all rfc defined http request headers) ===
* Referer
* Referer
* User-Agent
* User-Agent
Line 26: Line 27:
For the meanings of these, see RFC 2616.
For the meanings of these, see RFC 2616.


==Source formatting==
Formatting in [[sources.xml]]:


Example (if any variables are not needed, omit the required punctuation):
{{Helix updated}}
<pre>
  <source>
    <!--to connect as anonymous use "http://ipaddress:port/" or just "http://ipaddress"-->
    <path>http://username:password@ipaddress:port/directory/|option1=value1&option2=value2</path>
  </source>
</pre>
the http protocol options can be set as mentioned in 1.1/1.2.


==See also==
[[Category:File sharing]]
*[[WebDAV]]
[[Category:Manual]]
 
[[Category:File Sharing]]
[[Category:XBMC Manual]]

Revision as of 23:27, 29 January 2021

Home icon grey.png   ▶ File sharing ▶ HTTP

Kodi contains an HTTP-client with which you can add sources in all sections in the Kodi interface.

HTTP/HTTPS url format

Kodi supported normal http/https urls, additionally, it support optional options we called as 'protocol options' which user/addons can set so that Kodi can full simulate the browser operations with specified http request header values.

  • normal http url format:
 http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d
  • http url with 'protocol options':
 http[s]://[username[:password]@]host[:port]/directory/file?a=b&c=d|option1=value1&option2=value2

Kodi supported special http protocol options

  • auth

which is required if your HTTP server uses any type of authentication other than basic (which is, in fact, unsafe unless used over HTTPS). E.g. if your HTTP server uses digest authentication, use http://username:password@host:port/directory/|auth=digest. For maximum flexibility, use auth=any or auth=anysafe (i.e. anything other than basic).

  • seekable (13.0+ Gotham, since git bb79b32b)

when the media url is unseekable, addons can set seekable=0 protocol options, then Kodi won't try to seek on that url. if you set it in frodo or earlier, it will add a http header 'seekable: 0' in the http request, it's harmless.

Other http protocol options (they are all rfc defined http request headers)

  • Referer
  • User-Agent
  • Cookie
  • Encoding
  • any other http request headers defined in rfc.

For the meanings of these, see RFC 2616.