Ticket #4173: request_handler.patch

File request_handler.patch, 458 bytes (added by vic_in_kh, 4 years ago)

add onRequest handler where is possible to read cookies

  • twisted/web/websockets.py

     
    378378
    379379            ProtocolWrapper.loseConnection(self)
    380380
     381    def onRequest(self, request):
     382        request_hanler = getattr(self.wrappedProtocol,
     383                                 'onRequest',
     384                                 None)
     385        if request_hanler:
     386            request_hanler(request)
    381387
    382388
    383389class _WebSocketsFactory(WrappingFactory):