]> Cypherpunks repositories - gostls13.git/commit
net/http: add tests covering non-GET methods for file serving
authorDamien Neil <dneil@google.com>
Thu, 6 Apr 2023 18:01:05 +0000 (11:01 -0700)
committerDamien Neil <dneil@google.com>
Thu, 6 Apr 2023 19:13:31 +0000 (19:13 +0000)
commit7ce458726523ec8accb2f1ac2f1b21a60fb4bd6e
tree4e1cb9bb52fff35889a24254ef0b77c97e6ab745
parent96d2e416171845f114f8f865e42c427030bc807e
net/http: add tests covering non-GET methods for file serving

ServeFile and FileServer will respond to methods such as DELETE by
serving the file contents. This is surprising, but we don't want to
change it without some consideration.

Add tests covering the current behavior.

For #59470

Change-Id: Ib6a2594c5b2b7f380149fc1628f7204b308161e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/482876
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/http/fs_test.go