diff options
author | Jonathan Amsterdam <jba@google.com> | 2023-09-23 17:05:42 -0400 |
---|---|---|
committer | Jonathan Amsterdam <jba@google.com> | 2023-10-02 20:28:30 +0000 |
commit | eb070d7483f5d206008aa05921652e595b8425f2 (patch) | |
tree | 061b8dcf34ba8db1a91b9f7f855e1b538875be51 /doc/godebug.md | |
parent | 765dfb00b2c5085e601158e0867803006ef59791 (diff) | |
download | go-eb070d7483f5d206008aa05921652e595b8425f2.tar.gz go-eb070d7483f5d206008aa05921652e595b8425f2.zip |
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>
Diffstat (limited to 'doc/godebug.md')
-rw-r--r-- | doc/godebug.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/godebug.md b/doc/godebug.md index f35abe1104..d578e740be 100644 --- a/doc/godebug.md +++ b/doc/godebug.md @@ -138,6 +138,12 @@ Go 1.22 made it an error for a request or response read by a net/http client or server to have an empty Content-Length header. This behavior is controlled by the `httplaxcontentlength` setting. +Go 1.22 changed the behavior of ServeMux to accept extended +patterns and unescape both patterns and request paths by segment. +This behavior can be controlled by the +[`httpmuxgo121` setting](/pkg/net/http/#ServeMux). + + ### Go 1.21 Go 1.21 made it a run-time error to call `panic` with a nil interface value, |