> On Aug 25, 2017, at 2:50 PM, Lance Kurisaki <lkuris...@yahoo.com> wrote:
> 
> With HTTP/1.1, I used to be able to call 
> request.transport.getPeerCertificate(). When the client uses HTTP/2, however, 
> it seems that request.transport is None. How does one access the transport 
> with HTTP/2? Thank you...
>             Lance

I think this is just a bug; the `transport`.  I filed it here: 
https://twistedmatrix.com/trac/ticket/9270 
<https://twistedmatrix.com/trac/ticket/9270>

Please consider submitting a patch to Twisted so that this can be fixed in a 
useful way for everyone!

In the meanwhile, with the usual caveats about using private interfaces 
<https://twistedmatrix.com/documents/current/core/development/policy/compatibility-policy.html>
 you can retrieve the transport via "request.channel._conn.transport" in 
http/2, and the "clientproto" attribute of the request will tell you which kind 
of request it is.

Thanks for using Twisted; sorry for this bug,

-glyph

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to