Skip to content

Harden media type negotiation and preserve routed params#180

Open
itsviseph wants to merge 2 commits intomonzo:masterfrom
itsviseph:fix/content-negotiation-edge-cases
Open

Harden media type negotiation and preserve routed params#180
itsviseph wants to merge 2 commits intomonzo:masterfrom
itsviseph:fix/content-negotiation-edge-cases

Conversation

@itsviseph
Copy link

Summary

This PR improves a couple of request/response and routing edge cases in Typhon.

Changes

  • hardens media type parsing for protobuf request/response handling
  • supports protobuf content types with parameters like
  • avoids nil request access when encoding standalone protobuf responses
  • captures router params at dispatch time and stores them in request context
  • makes resilient even if request paths are mutated later in the request lifecycle

Validation

  • Ran ok github.com/monzo/typhon 0.321s
    ? github.com/monzo/typhon/examples [no test files]
    ? github.com/monzo/typhon/legacyprototest [no test files]
    ? github.com/monzo/typhon/prototest [no test files]

Notes

  • I focused on targeted library behavior fixes and added tests for the new cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant