Skip to content

Instantly share code, notes, and snippets.

@scrogson
Created August 7, 2014 15:45
Show Gist options
  • Save scrogson/bcf933783d0a786ae2a5 to your computer and use it in GitHub Desktop.
Save scrogson/bcf933783d0a786ae2a5 to your computer and use it in GitHub Desktop.
[range_type, range_start, range_end] =
case get_req_header(conn, "range") = hdr_range do
[] -> ["bytes", "0", "999"]
_ -> String.split(List.last(hdr_range), ["=", "-"])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment