Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16838

iPhone and Content-Range support (patch)

    XMLWordPrintable

    Details

      Description

      Hi,

      I recently post a topic on the forum http://share.ez.no/forums/developer/iphone-content-range-header about the support of video on iPhone mobile.

      I try to add videos on our mobile website. Videos are stored through the ezbinaryfile datatype. To provide an URL to the browser, I use the "content/download" approach.
      But it seems that the http header is not correctly formatted. Safari need a partial content (or Content-Range) but eZPublish return a wrong Content-Range.

      Refer : kernel/classes/binaryhandlers/ezfilepassthrough/ezfilepassthroughhandler.php

      Thanks.

      Regards,

      Fabien.

      Steps to reproduce

      Create an image (or video, or whatever)

      Do a range fetch by direct file access, this works (returns 100 bytes from the file):

      curl --range 0-99 http://localhost:81/var/ezwebin_site/storage/images/media/images/supergoogle/334-1-eng-GB/SuperGoogle.jpg -o GOOD
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0   100    0   100    0     0  35739      0 --:--:-- --:--:-- --:--:--     0
      
      ll -h GOOD
      -rw-r--r-- 1 gl users  100 2010-05-20 15:40 GOOD
      

      Do a range fetch through content/download, this fails (returns the complete file):

      curl --range 0-99 http://localhost:81/ezwebin_site/content/download/85/334/image/image.jpg -o NOGOOD
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100  251k  100  251k    0     0  1125k      0 --:--:-- --:--:-- --:--:-- 6404k
      
      ll -h NOGOOD
      -rw-r--r-- 1 gl users 252K 2010-05-20 15:40 NOGOOD
      

      Apply patch (attached)

      Again, do a range fetch through content/download, now it works (returns 100 bytes from the file):

      curl --range 0-99 http://localhost:81/ezwebin_site/content/download/85/334/image/image.jpg -o NOGOOD-FIX
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0   100    0   100    0     0    219      0 --:--:-- --:--:-- --:--:--     0
      
      ll -h NOGOOD-FIX
      -rw-r--r-- 1 gl users  100 2010-05-20 15:51 NOGOOD-FIX
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gl (inactive) Gunnstein Lye
              Reporter:
              gl (inactive) Gunnstein Lye
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: