Did you know that some podcast and media players will request the media file twice, before playing it?
It's true! … well, sort of.
Many media player – especially iTunes – will perform two request for the file, but it's not quite two duplicate requests. The first request is typically a request for meta-data about the file.
It's an HTTP “HEAD” request – basically the same as a standard “GET”, but without the complete body response.
In this episode, you'll see how to properly handle the HTTP “HEAD” verb, as opposed to the “GET” verb that most web apps deal with. You'll learn how to handle that with Express, and what information you need to send back. Perhaps more importantly, though, you'll learn what it means to proxy the HEAD request to S3. This is an important tactic, as it prevents you from having to setup a second redirect with more complicated S3 permissions. Instead, you'll allow your server to do the work and send the response back directly.