]> Cypherpunks.ru repositories - gostls13.git/commit
net/http: FileServer method check + minimal OPTIONS implementation
authorPascal S. de Kloe <pascal@quies.net>
Tue, 21 Jun 2022 16:50:35 +0000 (18:50 +0200)
committerDavid Chase <drchase@google.com>
Mon, 29 Aug 2022 17:12:01 +0000 (17:12 +0000)
commit0e16d67a560f22ac1fcbc1fa12d25add8bf649d6
tree27c837f5c860c44a73189eaadf061342ebe95c8d
parenteeb1ba7a89975beb1993242d8f2db05a6237e01c
net/http: FileServer method check + minimal OPTIONS implementation

FileServer provides a read-only service. Methods other than GET or HEAD should
be denied with an Allow header.

Fixes #53501

Change-Id: I1d31b405eefd90565ecd474ac3f8d8d6e3b15072
Reviewed-on: https://go-review.googlesource.com/c/go/+/413554
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/net/http/fs.go
src/net/http/fs_test.go