Public bug reported: Expected:
Apache2 should be able to serve Range requests for the first byte if it can serve open-ended Range requests for the whole file Observed: I upgraded from Ubuntu 18.04 to 20.04. On this server, I have Apache set up to serve video files from a CIFS mount. HTML5 clients are using HTTP Range Requests to obtain random access to the files. A typical request from a desktop looks like: Range: bytes=0- And Apache interprets that to mean "give me the whole file starting at byte 0, through the end of the file" A typical request from a mobile browser however, looks like this: Range: bytes=0-1 Where the browser wants to grab the first byte (Probably to read some video file meta data at the beginning of the file) The second type of request, where only the first byte is requested, is failing. If I copy a video from the CIFS mount to the local disk, however, it works just fine. So there seems to be something about grabbing files from the CIFS by byte ranges. The CIFS and mount are using protocol SMBv3. I've done some Googling and it seems like something regarding EnableSendfile is potentially a problem with remote mounts like CIFS or NFS. However, I can't seem to figure out why this used to work with an older version of cifs-utils and/or apache2 (I'm not sure which is really broken here). More succinctly, here is the issue demonstrated with curl: user@server:~$ curl http://localhost/videos/test_file.mp4 -H 'Range: bytes=0-1' curl: (1) Received HTTP/0.9 when not allowed user@server:~$ curl http://localhost/videos/test_file.mp4 -H 'Range: bytes=0-' Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. OS: Description: Ubuntu 20.04.2 LTS Release: 20.04 Relevant package info: apache2: Installed: 2.4.41-4ubuntu3.1 Candidate: 2.4.41-4ubuntu3.1 Version table: *** 2.4.41-4ubuntu3.1 500 500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 100 /var/lib/dpkg/status 2.4.41-4ubuntu3 500 500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages cifs-utils: Installed: 2:6.9-1ubuntu0.1 Candidate: 2:6.9-1ubuntu0.1 Version table: *** 2:6.9-1ubuntu0.1 500 500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 100 /var/lib/dpkg/status 2:6.9-1 500 500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages ** Affects: apache2 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1916391 Title: Range requests broken on CIFS mounted document root To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1916391/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs