Accept-Bytes header not read when server redirects

Topics: Windows 8 Xaml
Jul 8, 2013 at 7:11 PM
This is probably a Media Foundation issue, but I'm not sure where else to post it. Suggestions welcome.

The short of it is that an MP4 file that will play back immediately when referenced by direct url requires a full download when referenced by a redirect url.

The direct URL provides an Accept-Bytes header, which should be sufficient for Media Foundation to seek and find the relevant MOOV atom. However, it seems like MF only looks at the initial response headers when making this determination, and doesn't see the Accept-Bytes header on the second response.

Please advise.

cf as an example the following content:

E:\Build\Temp>curl -v "http://dts.podtrac.com/redirect.mp4/twit.cachefly.net/video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4"
  • About to connect() to dts.podtrac.com port 80 (#0)
  • Trying 69.16.232.40...
  • connected
  • Connected to dts.podtrac.com (69.16.232.40) port 80 (#0)
GET /redirect.mp4/twit.cachefly.net/video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4 HTTP/1.1
User-Agent: curl/7.26.0
Host: dts.podtrac.com
Accept: /

< HTTP/1.1 302 Found
< Cache-Control: no-cache, no-store, must-revalidate
< Pragma: no-cache
< Expires: -1
< Location: http://twit.cachefly.net/video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4
< Server: Microsoft-IIS/7.5
< X-Powered-By: ASP.NET
< Date: Mon, 08 Jul 2013 18:40:12 GMT
< Content-Length: 215
<
<html><head><title>Object moved</title></head><body><!-- pageview_candidate --><h2>Object moved to <a href="http://twit.cachefly.net/video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4">here.

</body></html>* Connection #0 to host dts.podtrac.com left intact
  • Closing connection #0
E:\Build\Temp>curl -v "http://twit.cachefly.net/video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4" > foo.mp4
  • About to connect() to twit.cachefly.net port 80 (#0)
  • Trying 205.234.175.175...
    % Total % Received % Xferd Average Speed Time Time Time Current
                             Dload  Upload   Total   Spent    Left  Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0* connected
  • Connected to twit.cachefly.net (205.234.175.175) port 80 (#0)
GET /video/nsfw/nsfw0182/nsfw0182_h264m_1280x720_1872.mp4 HTTP/1.1
User-Agent: curl/7.26.0
Host: twit.cachefly.net
Accept: /

< HTTP/1.1 200 OK
< Server: CFS 1228
< Date: Mon, 08 Jul 2013 18:40:35 GMT
< Content-Type: video/mp4
< Connection: keep-alive
< ETag: "48c8d366c5522cb15e9aa7a83d415dda"
< X-CF1: fD.lax1:cf:cacheA.lax1-01
< Content-Length: 1151499223
< Last-Modified: Wed, 12 Jun 2013 22:19:05 GMT
< X-CF2: L
< Accept-Ranges: bytes
<
{ [data not shown]
1 1098M 1 12.2M 0 0 575k 0 0:32:32 0:00:21 0:32:11 657k^C
Coordinator
Jul 18, 2013 at 9:31 PM
Interesting issue, I wasn't aware of this. You might want to post this on the MSDN dev forum since the issue would also affect the MediaElement too.