Gotham - seeking on some http streams broken

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DBMandrake Offline
Fan
Posts: 434
Joined: Feb 2013
Reputation: 12
Location: UK
Post: #76
(2014-04-18 20:30)takoi Wrote:  
(2014-04-18 19:32)DBMandrake Wrote:  So is the problem the server is sending two incompatible headers in the same response ? (It shouldn't even need to use chunked to send a file of known file size anyway, its only intended for dynamically generated content) Or is XBMC too literal in its interpretation of the headers - if it finds a Content-Length header should it just use it anyway ?

I don't know. I'm sure that the test you highlighted on line 949 was put there for a reason...

Is there a config option on your dav server to disable chunked encoding ?
That's the question. I have no idea either, it does seem picky though.
For me, I think I'll at least install the webdav module to apache and try that before doing any debugging or fixing of davserver or xbmc. I might not even end up using that server anyway..
Have a look at the pywebdav documentation - looks like there is a config option to disable chunk support:

Quote:0.9.4 (April 15 2010)

Add somme configuration setting variable to enable/disable iterator and chunk support [Stephane Klein]

https://pypi.python.org/pypi/PyWebDAV

XBMC 13.2 - Mid 2007 Mac Mini, 4GB, 2TB HD, OS X 10.6.8.
XBMC 13.2 - Raspberry Pi 512MB Model B, 16GB SD, Raspbmc.
(This post was last modified: 2014-04-18 20:57 by DBMandrake.)
find quote
Kib Offline
Team-Kodi Server Dude
Posts: 3,538
Joined: Jan 2010
Reputation: 54
Location: NL
Post: #77
You totally misunderstood me.

I just meant that if you want to test apache you don't need the WebDAV plugin, since you don't use dav functionality. Right?

Neon skin - v3.0.8 now available for XBMC 13.x (Gotham)
(This post was last modified: 2014-04-19 08:57 by Kib.)
find quote
takoi Offline
Posting Freak
Posts: 750
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #78
(2014-04-19 08:56)Kib Wrote:  You totally misunderstood me.

I just meant that if you want to test apache you don't need the WebDAV plugin, since you don't use dav functionality. Right?
Ah, commas.. Sure, to test http, but I plan on using the dav functionality.

Anyway, seeking with apache and nginx works fine.

(2014-04-18 20:56)DBMandrake Wrote:  Have a look at the pywebdav documentation - looks like there is a config option to disable chunk support:
Then it just crash on all request regardless of client. The whole library seems kinda buggy to me. example config file doesn't even load because of missing properties
(This post was last modified: 2014-04-19 13:10 by takoi.)
find quote
DBMandrake Offline
Fan
Posts: 434
Joined: Feb 2013
Reputation: 12
Location: UK
Post: #79
Sounds to me like pywebdav is just plain buggy so I would try something else. I wouldn't have thought that a WebDAV server written in Python would have very good performance either - something written in C/C++ should have a lot better performance when serving large high bitrate files.

XBMC 13.2 - Mid 2007 Mac Mini, 4GB, 2TB HD, OS X 10.6.8.
XBMC 13.2 - Raspberry Pi 512MB Model B, 16GB SD, Raspbmc.
find quote
Kib Offline
Team-Kodi Server Dude
Posts: 3,538
Joined: Jan 2010
Reputation: 54
Location: NL
Post: #80
Check if you have the same issues with Apache webDAV or IIS.

I am inclined to think it might indeed be the pywebdav implementation, which hasn't been worked on for 3 years.

Neon skin - v3.0.8 now available for XBMC 13.x (Gotham)
(This post was last modified: 2014-04-19 22:57 by Kib.)
find quote
takoi Offline
Posting Freak
Posts: 750
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #81
(2014-04-19 22:10)DBMandrake Wrote:  Sounds to me like pywebdav is just plain buggy so I would try something else. I wouldn't have thought that a WebDAV server written in Python would have very good performance either - something written in C/C++ should have a lot better performance when serving large high bitrate files.
I'm not going to serve hundreds of concurrent downloads. It's more than fast enough for streaming blurays for a couple of users. pywebdav is nice because you can run in userspace, and is very easy to setup to host a simple directory with no configuration required at all. If you know any other alternatives, shoot!

(2014-04-19 22:56)Kib Wrote:  Check if you have the same issues with Apache webDAV or IIS.

I am inclined to think it might indeed be the pywebdav implementation, which hasn't been worked on for 3 years.
Already tried webdav in apache. Seeking works fine, but one important problem: apparently it deliberately ignores symlinks so you need to configure each directory to host individually, sigh
(This post was last modified: 2014-04-20 15:18 by takoi.)
find quote
Kib Offline
Team-Kodi Server Dude
Posts: 3,538
Joined: Jan 2010
Reputation: 54
Location: NL
Post: #82
Mount bindpoints should work with webdav in apache2

Neon skin - v3.0.8 now available for XBMC 13.x (Gotham)
(This post was last modified: 2014-04-20 15:38 by Kib.)
find quote
DBMandrake Offline
Fan
Posts: 434
Joined: Feb 2013
Reputation: 12
Location: UK
Post: #83
(2014-04-20 15:17)takoi Wrote:  Already tried webdav in apache. Seeking works fine, but one important problem: apparently it deliberately ignores symlinks so you need to configure each directory to host individually, sigh
Apache will happily follow symlinks if you configure the virtualhost entry correctly.

I used apache running on the Raspberry Pi (Linux) as the test server for the debugging in this thread and I had some of my test videos on an external USB drive - and a symlink in the httpdocs directory pointing to the mount point for the drive (under /media) and it worked fine.

Make sure you have Options FollowSymLinks in your virtualhost directive, for example here is what I was using:

Code:
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/pi
        <Directory /home/pi>
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/pi>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Also make sure that the apache user (usually www-data) has read access to the directory and files that the symlink points to or it will not work or show up in the directory listings. Apache can only follow symlinks if it has permission in the file system to do so...(I couldn't get it to work at first but realised that the mount point for the external drive had rwx------ permissions so the apache user didn't have read permission)

XBMC 13.2 - Mid 2007 Mac Mini, 4GB, 2TB HD, OS X 10.6.8.
XBMC 13.2 - Raspberry Pi 512MB Model B, 16GB SD, Raspbmc.
(This post was last modified: 2014-04-20 16:18 by DBMandrake.)
find quote
Kib Offline
Team-Kodi Server Dude
Posts: 3,538
Joined: Jan 2010
Reputation: 54
Location: NL
Post: #84
Actually the webdav extension ignores the followsymlinks directive. This is why I pointed at mount bind instead.

Neon skin - v3.0.8 now available for XBMC 13.x (Gotham)
(This post was last modified: 2014-04-20 16:18 by Kib.)
find quote
DBMandrake Offline
Fan
Posts: 434
Joined: Feb 2013
Reputation: 12
Location: UK
Post: #85
(2014-04-20 16:17)Kib Wrote:  Actually the webdav extension ignores the followsymlinks directive. This is why I pointed at mount bind instead.
That sucks. Another option if the files are on the same partition would be hard links...

XBMC 13.2 - Mid 2007 Mac Mini, 4GB, 2TB HD, OS X 10.6.8.
XBMC 13.2 - Raspberry Pi 512MB Model B, 16GB SD, Raspbmc.
find quote
Post Reply