Kodi Not Seeing files over HTTP on IIS Webserver
#1
Having an issue where Kodi is not getting a directory listing of files from IIS webservers, but can get the listing from apache servers just fine. And yes, directory listing is enabled.

This is happening with Kodi 16 and 17 on Android as well as Windows.

Basically use is like this:

- Add http source that is an IIS server with directory browsing enabled.
- Go to Addons - Install from zip - select newly added source.
- Nothing. No files listed.

- Add http source that is Apache with directory browsing enabled
- Go to Addons - Install from zip - select newly added source.
- Files are listed!

This is also happening with HTTPS.

Anyone have any ideas? I was unable to locate anything on bug tracker about this.

Relevant part of debug log:

Code:
09:08:42 T:12824   DEBUG: ------ Window Init (FileBrowser.xml) ------
09:08:44 T:12824   DEBUG: Keyboard: scancode: 0x50, sym: 0x0112, unicode: 0x0000, modifier: 0x0
09:08:44 T:12824   DEBUG: CInputManager::OnKey: down (0xf081) pressed, action is Down
09:08:46 T:12824   DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
09:08:46 T:12824   DEBUG: CInputManager::OnKey: return (0xf00d) pressed, action is Select
09:08:46 T:13492   DEBUG: CurlFile::Open(0F38EFB0) http://someapacheserver.xyz
09:08:46 T:13492    INFO: XCURL::DllLibCurlGlobal::easy_aquire - Created session to http://someapacheserver.xyz
09:08:46 T:13492   DEBUG: Curl::Debug - TEXT: timeout on name lookup is not supported
09:08:46 T:13492   DEBUG: Curl::Debug - TEXT:   Trying XX.XXX.XX.XXX...
09:08:46 T:13492   DEBUG: Curl::Debug - TEXT: Connected to someapacheserver.xyz (XX.XXX.XX.XXX) port 80 (#0)
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: GET /wizard/ HTTP/1.1
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Host: someapacheserver.xyz
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=0-
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: User-Agent: Kodi/16.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/16.1-Git:20160424-c327c53
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: HTTP/1.1 206 Partial Content
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: Date: Mon, 20 Feb 2017 15:08:54 GMT
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: Server: Apache
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: Content-Range: bytes 0-757/758
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: Content-Length: 758
09:08:46 T:13492   DEBUG: Curl::Debug - HEADER_IN: Content-Type: text/html;charset=ISO-8859-1
09:08:46 T:13492   DEBUG: Curl::Debug - TEXT: Connection #0 to host someapacheserver.xyz left intact
09:08:47 T:12824   DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
09:08:47 T:12824   DEBUG: CInputManager::OnKey: return (0xf00d) pressed, action is Select
09:08:48 T:12824   DEBUG: Keyboard: scancode: 0x48, sym: 0x0111, unicode: 0x0000, modifier: 0x0
09:08:48 T:12824   DEBUG: CInputManager::OnKey: up (0xf080) pressed, action is Up
09:08:49 T:12824   DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
09:08:49 T:12824   DEBUG: CInputManager::OnKey: return (0xf00d) pressed, action is Select
09:08:49 T:13492   DEBUG: CurlFile::Open(0F38EFB0) http://someiisserver.xyz
09:08:49 T:13492    INFO: XCURL::DllLibCurlGlobal::easy_aquire - Created session to http://someiisserver.xyz
09:08:49 T:13492   DEBUG: Curl::Debug - TEXT: timeout on name lookup is not supported
09:08:49 T:13492   DEBUG: Curl::Debug - TEXT:   Trying XX.XXX.XX.XXX...
09:08:49 T:13492   DEBUG: Curl::Debug - TEXT: Connected to someiisserver.xyz (XX.XXX.XX.XXX) port 80 (#0)
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: GET /wizard/ HTTP/1.1
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Host: someiisserver.xyz
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=0-
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: User-Agent: Kodi/16.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/16.1-Git:20160424-c327c53
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_IN: HTTP/1.1 200 OK
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_IN: Content-Type: text/html; charset=UTF-8
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_IN: Server: Microsoft-IIS/10.0
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_IN: Date: Mon, 20 Feb 2017 15:08:49 GMT
09:08:49 T:13492   DEBUG: Curl::Debug - HEADER_IN: Content-Length: 1199
09:08:49 T:13492   DEBUG: Curl::Debug - TEXT: Connection #0 to host someiisserver.xyz left intact


URLs and IPs obfuscated for obvious reasons.
Reply
#2
the http directory is parsed using regular expressions - it has one set for lighttpd, one for apache and one for nginx, but none for iis. try dav or patch xbmc/filesystem/HTTPDirectory.cpp
Reply
#3
Any reason why there isn't anything in there for IIS? I wish I was familiar with regex and C++ to understand what was going on.
Reply
#4
Hi,

I had the same issue but not with IIS but with another web server 'Light Speed'.

After hours or trial and error I found a solution as no matter what I did Kodi would not look at the directory listing. Although in my case it was to view fanart images for a skin.

Although not the same but it may help.

I used a php directory listing script from http://www.liamdelahunty.com/tips/php_li...ectory.php .

Although I needed to add the <?php ..... ?> tag to the printed version on the site it worked great.

Here is the whole code without the php tag as it wont post here being php code.

Quote:// open this directory
$myDirectory = opendir(".");

// get each entry
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}

// close directory
closedir($myDirectory);

// count elements in array
$indexCount = count($dirArray);
Print ("$indexCount files<br>\n");

// sort 'em
sort($dirArray);

// print 'em
print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n");
print("<TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR>\n");
// loop through the array of files and print them all
for($index=0; $index < $indexCount; $index++) {
if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files
print("<TR><TD><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td>");
print("<td>");
print(filetype($dirArray[$index]));
print("</td>");
print("<td>");
print(filesize($dirArray[$index]));
print("</td>");
print("</TR>\n");
}
}
print("</TABLE>\n");

Good luck and hope this helps.
Reply
#5
(2017-02-20, 20:04)death2all110 Wrote: Any reason why there isn't anything in there for IIS? I wish I was familiar with regex and C++ to understand what was going on.

because none of the devs uses IIS for such things and nobody else contributed code for it.
Reply
#6
@lordsetesh 

I'm having the same issue with a litespeed server.

can you explain more about this please as I know nothing about php or where to put the file to make the directory list in Kodi.
Reply
#7
Hi,
I had the same issue with 'Light Speed'
in my case is to view multiple background images for the skin.
I try the upper code  but  it didn't help .  
i create a php file with the upper  code and place it in the sub domain folder but i  cant see  from kodi  the  sub folders were i have the images  .
any ideas  ?

Thanks in advance
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi Not Seeing files over HTTP on IIS Webserver0