[whatwg] Redirect handling for <audio> & <video>

Aaron Colwell acolwell at google.com
Thu Mar 3 13:15:58 PST 2011


I was looking at the resource fetch
and fetching
resources <http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#fetch>
sections of the HTML5 spec to determine what the proper behavior is for
redirects. Both YouTube and Vimeo do 302 redirects to different hostnames
the URLs specified in the src attribute. It looks like the spec says that
playback should fail in these cases because they are from different
origins (Section 2.7 Fetching resources bullet 7). This leads me to a few

1. Is my interpretation of the spec correct? Sample YouTube & Vimeo URLs are
   shown below.
   YouTube : src      : http://v22.lscache6.c.youtube.com/videoplayback? ...
             redirect : http://tc.v22.cache6.c.youtube.com/videoplayback?

   Vimeo   : src      : http://player.vimeo.com/play_redirect? ...
             redirect : http://av.vimeo.com/05 ...

2. What about http: -> https: redirects? Some content is required to be
   only via https and this sort of redirect enforces that but isn't really a
different origin.

3. If my interpretation of the spec is correct, are there proposals to
change this
   or other specs that allow content providers to signal that these
different hostnames
   actually represent the same "origin".

Thanks for your help,

More information about the whatwg mailing list