Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-6413

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 10.0.0.Final
    • Fix Version/s: 10.1.0.CR1, 10.1.0.Final
    • Component/s: Web (Undertow)
    • Labels:
      None
    • Environment:

      WildFly 10.0.0.Final
      Windows 7 or Mac 10.11.3
      Java 8
      Chrome, Firefox, Safari

    • Steps to Reproduce:
      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  jasonholmberg Jason Holmberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: