]> Cypherpunks.ru repositories - gostls13.git/commit
net/http: add GODEBUG setting for old ServeMux behavior
authorJonathan Amsterdam <jba@google.com>
Sat, 23 Sep 2023 21:05:42 +0000 (17:05 -0400)
committerJonathan Amsterdam <jba@google.com>
Mon, 2 Oct 2023 20:28:30 +0000 (20:28 +0000)
commiteb070d7483f5d206008aa05921652e595b8425f2
tree061b8dcf34ba8db1a91b9f7f855e1b538875be51
parent765dfb00b2c5085e601158e0867803006ef59791
net/http: add GODEBUG setting for old ServeMux behavior

Add the GODEBUG setting httpmuxgo121.
When set to "1", ServeMux behaves exactly like it did in Go 1.21.

Implemented by defining a new, unexported type, serveMux121, that
uses the original code.

Updates #61410.

Change-Id: I0a9d0fe2a2286e442d680393e62895ab50683cea
Reviewed-on: https://go-review.googlesource.com/c/go/+/530461
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
doc/godebug.md
src/internal/godebugs/table.go
src/net/http/request_test.go
src/net/http/servemux121.go [new file with mode: 0644]
src/net/http/server.go
src/net/http/server_test.go
src/runtime/metrics/doc.go