Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/subrouter custom methodNotAllowed handler returning 404 (#509) #510

Conversation

jonasdebeukelaer
Copy link
Contributor

Fixes #509

Summary of Changes

  1. check new handler not nil before discarding MethodNotAllowed error
  2. add unit test

@jonasdebeukelaer jonasdebeukelaer force-pushed the bugfix/subrouter-custom-methodNotAllowed-handler-returning-404 branch from a9ce43a to c4781b8 Compare August 20, 2019 08:23
Copy link
Contributor

@elithrar elithrar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this - just one minor nit.

mux_test.go Outdated Show resolved Hide resolved
@jonasdebeukelaer jonasdebeukelaer force-pushed the bugfix/subrouter-custom-methodNotAllowed-handler-returning-404 branch from c4781b8 to db220ca Compare August 20, 2019 12:37
@jonasdebeukelaer
Copy link
Contributor Author

happy to merge this @elithrar ?

@elithrar
Copy link
Contributor

elithrar commented Aug 24, 2019 via email

@elithrar elithrar self-assigned this Aug 26, 2019
@elithrar elithrar added the bug label Aug 26, 2019
@elithrar elithrar merged commit 9536e40 into gorilla:master Aug 26, 2019
@elithrar
Copy link
Contributor

Merged - thanks @jonasdebeukelaer!

@jonasdebeukelaer jonasdebeukelaer deleted the bugfix/subrouter-custom-methodNotAllowed-handler-returning-404 branch August 27, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] setting custom MethodNotAllowedHandler for subrouter returns 404s
2 participants