Forums / Developer / Iphone / Content-Range header

Iphone / Content-Range header

Author Message

Fabien Scantamburlo

Tuesday 18 May 2010 7:19:05 am

Hi everyone,

I'm trying to add videos (ezbinaryfile datatye) on a iphone siteacess.

I use the <video/> tag and provide the "content/download" url to the src attribute. But it doesn't work.

After many hours of tests, there's my result:

I add in override/file.ini.append.php, add:

[PassThroughSettings]
ContentDisposition[video/mp4]=inline

to accept Content-disposition: inline header.

Now, I need to manage the Content-Range header because Safari/Quicktime return "The Server is not correctly Configured". I read the Safari manual :
http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/CreatingVideoforSafarioniPhone.html#//apple_ref/doc/uid/TP40006514-SW6

And it seems that's the Content-Range is not returned when I use the "content/download/.." URL. But when I bypass eZPublish, Apache returns the right Content-Range and the video is fine (using var/plain_site/storage/original/video/video.mp4).

Result:

curl --range 0-99 http://vm36/ezmobile/index.php/mobile_nutraingredients/content/downlo ad/97691/1758478/file/video.mp4 -o /var/www/ezmobile/NOGOOD
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15.5M  100 15.5M    0     0  54.6M      0 --:--:-- --:--:-- --:--:--  160M

curl --range 0-99 http://vm36/ezmobile/var/plain_site/storage/original/video/e7f15ee0d2 bded3ef13ce60222970250.mp4 -o /var/www/ezmobile/GOOD
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   100    0   100    0     0  71479      0 --:--:-- --:--:-- --:--:--     0

It seems that eZPublish doesn't support partial range.

Is there any way to return the good header as Apache does ?

Thanks,

Fabien.

Fabien Scantamburlo

Friday 21 May 2010 2:36:21 am

The defect has been fixed with the patch : http://issues.ez.no/16838

Cheers,

Fabien.