Ticket #4173: cookie_connectionMade.patch

File cookie_connectionMade.patch, 1.1 KB (added by phrearch, 4 years ago)

cookie and connectionMade patch

Line 
1*** websocket.py        2010-07-12 11:11:29.239039046 +0200
2--- websocket_update.py 2010-07-15 11:03:41.753587508 +0200
3***************
4*** 195,200 ****
5--- 195,201 ----
6          if not handlerFactory:
7              return finish()
8          transport = WebSocketTransport(self)
9+         transport.cookie = self.requestHeaders.getRawHeaders("Cookie", [])
10          handler = handlerFactory(transport)
11          transport._attachHandler(handler)
12 
13***************
14*** 253,258 ****
15--- 254,260 ----
16              # XXX we probably don't want to set _transferDecoder
17              self.channel._transferDecoder = WebSocketFrameDecoder(
18                  self, handler)
19+             handler.connectionMade()
20              return
21 
22 
23***************
24*** 374,380 ****
25          connection is closed.
26          """
27 
28!
29 
30  class WebSocketFrameDecoder(object):
31      """
32--- 376,385 ----
33          connection is closed.
34          """
35 
36!     def connectionMade(self):
37!         """
38!         Callback called when the underlying transport is ready
39!         """
40 
41  class WebSocketFrameDecoder(object):
42      """