mime.ParseMediaType already takes care of this.
A proxy that serves oEmbed replies for arbitrary URLs.
MIT