This changes RouteMatch so it contains a slice of the methods that would
have been accepted. That slice is then used to populate the Allow header
accordingly.
This makes the default behavior of mux when returning 405 Method Not
Allowed compliant with [RFC 7231§6.5.5][RFC7231].
[RFC7231]: https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.5
Comment for CurrentRoute claimed that setting the KeepContext option would propagate
the Route even after the request. The KeepContext option is deprecated and has no effect.
* Remove context helpers in context.go
* Update request context funcs to take concrete types
* Move TestNativeContextMiddleware to mux_test.go
* Clarify KeepContext Go 1.7+ comment
Mux doesn't build on Go < 1.7 so the comment doesn't really need to
clarify anymore.
* Pull out common shared `routeConf` so that config is pushed on to child
routers and routes.
* Removes obsolete usages of `parentRoute`
* Add tests defining compositional behavior
* Exercise `copyRouteConf` for posterity
* [docs] Note StrictSlash re-direct behaviour #308
* StrictSlash enabled routes return a 301 to the client
* As per the HTTP standards, non-idempotent methods, such as POST or PUT, will be followed with a GET by the client
* Users should use middleware if they wish to change this behaviour to return a HTTP 308.
* Update description of StrictSlash
* Add mechanism to route based on the escaped path, correct request mocking in tests
* Remove unneccessary regex matching, substitute with string slicing
* Add test case and handling for requests with no host/scheme
By default paths are run through the cleanPath method which prevents
using fancier paths like /fetch/http://xkcd.com/534
This adds a SkipClean option so that this path isn't redirected to
/fetch/http/xkcd.com/534
Issue #16: Added regex support for matching headers
Issue #16 : Addressed code review and refactored support for regex into
a separate function
Added compiled regex to route matcher
Issue #16: Added regex support for matching headers
Issue #16 : Addressed code review and refactored support for regex into
a separate function
Added compiled regex to route matcher