Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3931

Range headers do not seem to be handled correctly and prevents video delivery in Chrome and Safari

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.0.0.CR1
    • None
    • Undertow
    • None
    • Hide

      Enable range header as described here:

      https://developer.jboss.org/message/953058#953058

      Deploy a simple application to WildFly that serves video content via HTML5, like this: https://github.com/slowtrailrunner/html5-vidtest

      Load the page with the video (if using the above example then http://localhost:8880/vidtest/) in various browsers:

      • Chrome - will not play video
      • Safari - will not play video
      • Firefox - will play video

      Run this from the CLI, note the results:

      curl -sD - -o /dev/null --range 0- http://localhost:8880/vidtest/vidtest.mp4
      

      Now deploy the same war to Tomcat 8 and do the above steps again. Notice that the video is playable in all the browsers. Also note the difference in the result from the `curl` test.

      Show
      Enable range header as described here: https://developer.jboss.org/message/953058#953058 Deploy a simple application to WildFly that serves video content via HTML5, like this: https://github.com/slowtrailrunner/html5-vidtest Load the page with the video (if using the above example then http://localhost:8880/vidtest/ ) in various browsers: Chrome - will not play video Safari - will not play video Firefox - will play video Run this from the CLI, note the results: curl -sD - -o /dev/null --range 0- http://localhost:8880/vidtest/vidtest.mp4 Now deploy the same war to Tomcat 8 and do the above steps again. Notice that the video is playable in all the browsers. Also note the difference in the result from the `curl` test.

    Description

      Safari on iOS requires range headers to be able to play video content via HTML5. So enabling range headers in WildFly should make this happen. It does not. Enabling the range headers actually prevent Chrome from playing the video content, which previously worked when the range headers were NOT enabled.

      After enabling range headers as described here:

      https://developer.jboss.org/message/953058#953058

      I made some range requests via `curl` to see what is being returned:

      This is the result of a request to WildFly with the Range headers enabled:

      $ curl -I --range 0- http://localhost:8880/vidtest/vidtest.mp4
      HTTP/1.1 200 OK
      Connection: keep-alive
      Last-Modified: Thu, 17 Mar 2016 19:15:42 GMT
      X-Powered-By: Undertow/1
      Server: WildFly/10
      Content-Type: video/mp4
      Content-Length: 8200890
      Date: Fri, 18 Mar 2016 16:59:55 GMT
      

      This is the result of a request to the same content being served from Tomcat 8, no special config required. All the browsers can play the content when served from Tomcat 8:

      $ curl -I --range 0- http://localhost:8080/vidtest/vidtest.mp4
      HTTP/1.1 206 Partial Content
      Server: Apache-Coyote/1.1
      Accept-Ranges: bytes
      ETag: W/"8200890-1458232627000"
      Last-Modified: Thu, 17 Mar 2016 16:37:07 GMT
      Content-Range: bytes 0-8200889/8200890
      Content-Type: video/mp4
      Content-Length: 8200890
      Date: Fri, 18 Mar 2016 17:00:08 GMT
      

      I have created a small project that I have been using to trouble shoot this issue: https://github.com/slowtrailrunner/html5-vidtest

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              slowtrailrunner Jason Holmberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: