mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Long ago, the maintainers of gorilla/mux concluded that
it was a "wontfix" to return StatusMethodNotAllowed instead
of StatusNotFound for a method mismatch. Pilosa had a
workaround for this for the most common case (GET requests
to /index/{index}/query), and a TODO to address the other
cases.
While browsing the go-pilosa client code, I noticed that there
is a test for roaring import support which relies on getting
StatusMethodNotAllowed. But how can this work, if gorilla/mux
doesn't do that?
Answer: They started doing it in mid-2017, apparently:
https://github.com/gorilla/mux/issues/271
Dropping this code changes the exact text of the message
produced for that one case, but not the status code,
and makes the behavior less confusing.
|
||
|---|---|---|
| .. | ||
| client.go | ||
| client_test.go | ||
| error.go | ||
| handler.go | ||
| handler_internal_test.go | ||
| handler_test.go | ||
| translator.go | ||
| translator_test.go | ||