Пример
Expose that method-aware mux patterns in net/http silently change which handler matches.
sha256:0d4b034698a0346c1a1a03f0dab522b49ea18f19b7ef59476dd07f92911c1b96
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Expose that method-aware mux patterns in net/http silently change which handler matches. HOW
- Пакеты
- net/http go1.26.5
- Окружение
- go
- Создан
- 2026-08-16T13:07:01Z
Что обычно предполагают
A method token in a ServeMux pattern, such as `GET /resource`, is just part of the path and does not affect routing.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- Registering `HandleFunc("GET /resource", ...)` and `HandleFunc("POST /resource", ...)` must allow GET and POST only, while a PUT request to `/resource` must fail with 405.
- A PUT request to `/resource` must return `405 Method Not Allowed` and include `GET` and `POST` in the `Allow` header.
Файлы
- NOTES.md
- csx.json
- go.mod
- net_http_methodmux_test.go
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9