Skip to content

expose API to customize 404 and 405 handlers #38

Description

@qm012

http.ServeMux hardcodes the 404 and 405 responses, so sim cannot customize them.

Proposed API:

app.SetNotFoundHandler(h http.Handler)
app.SetMethodNotAllowedHandler(h http.Handler)

Defaults stay identical to http.ServeMux behavior; fully backward compatible.

Related:
golang/go#65648

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions