HTTP/2 trailers not supported


I’m trying to intercept gRPC traffic and getting a:

NotImplementedError(‘TrailersReceived not implemented’,)

I could be wrong but it seems like hyper-h2 already supports this in v3.0.1 but mitmproxy is using v2.6.2 . Is there any plan to support this? any suggestions for the time being?

Kind regards,


hyper-h2 has supported trailers for a long time: v2.6.2 supported them just as well as v3.0.1 does. This error appears to come from mitmproxy itself, as you can see here.

I’m not a mitmproxy core so I can’t be certain, but if I had to guess I’d say that the likely explanation is that mitmproxy doesn’t support HTTP/1.1 trailers either. I certainly can’t find any reference to them in the codebase at this time.

Certainly there’s a question to be asked about whether mitmproxy should treat this as a warning situation, rather than an error. Perhaps mitmproxy could even just add silent support and have a TODO about exposing trailers in the dissector. Until that time, though, mitmproxy is not well suited for intercepting gRPC traffic, sadly.


Thank you.

Could you please help me better understand this i.e. what exactly means for a proxy to support HTTP/2 trailers? even if it is unable to display well parsed details on the screen, is the lack of support for trailers an impediment to allow the connection to go through?


This is true, there just hasn’t been any demand for this. gRPC sounds like a reasonable use case though, so this is something we should fix. I created to track this.

We currently just fail visibly as want to avoid that someone transfers data through mitmproxy without the mitmproxy user noticing. We should forward the trailers, store them, and make them visible in the UI.

Thank you two!