]> Cypherpunks repositories - gostls13.git/commit
net/http: fix application/ogg sniff signature
authorEmmanuel Odeke <emm.odeke@gmail.com>
Sun, 28 May 2017 00:25:31 +0000 (18:25 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 13 Jun 2017 20:27:43 +0000 (20:27 +0000)
commitf363817f143a7cee0ccdb7833a99ac1e8f210197
tree20ea4e6d7e39154296069c270ad312283a4bec7f
parentd4ab73d1dfd60bfe1cf24c3682ba8110994b49dd
net/http: fix application/ogg sniff signature

I accidentally set the wrong pattern mask as
* []byte("\x4F\x67\x67\x53\x00") --> "OggS", the byte pattern itself.
instead of
* []byte("\xFF\xFF\xFF\xFF\xFF")
which was a copy-paste error.

The correct pattern is described at
https://mimesniff.spec.whatwg.org/#matching-an-audio-or-video-type-pattern
which I was using as a reference but I mistyped.

Fixes #20513

Change-Id: Ie9cb60ac7edbf03075070878775b964116ce92d0
Reviewed-on: https://go-review.googlesource.com/44336
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/net/http/sniff.go
src/net/http/sniff_test.go