]> Cypherpunks repositories - gostls13.git/commit
net/http: add more audio/video mime sniffing
authorEmmanuel Odeke <emm.odeke@gmail.com>
Tue, 24 Nov 2015 09:57:01 +0000 (02:57 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 26 Mar 2016 08:58:57 +0000 (08:58 +0000)
commitb9daf0a408acb4099eda268ed80203f83ecd3fa5
tree518479999c0db719530f610515eff4ccd2b8c4db
parentd53287d0c37de1e624648dc9a1b1be356a2acf13
net/http: add more audio/video mime sniffing

Following the spec at
  https://mimesniff.spec.whatwg.org/#matching-an-audio-or-video-type-pattern

Adds signatures for:
+ audio/aiff
+ audio/basic
+ audio/midi
+ audio/mpeg
+ video/avi

Updates the signature for:
+ application/ogg

Also updates the pattern matching algorithm in
  https://mimesniff.spec.whatwg.org/#matching-a-mime-type-pattern
by implementing clause 4 that dictates that the number of bytes in
the pattern must match the number of bytes in the mask.

Fixes #13383

Change-Id: Ie321f392e6570299c17176adf1c75f62f357e1e8
Reviewed-on: https://go-review.googlesource.com/17132
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/sniff.go
src/net/http/sniff_test.go