Example #1
0
    def handshake(self):

        req = read_request(self.rfile)
        key = self.protocol.check_client_handshake(req.headers)

        preamble = 'HTTP/1.1 101 %s' % status_codes.RESPONSES.get(101)
        self.wfile.write(preamble.encode() + b"\r\n")
        headers = self.protocol.server_handshake_headers(key)
        self.wfile.write(str(headers) + "\r\n")
        self.wfile.flush()
        self.handshake_done = True
Example #2
0
    def handshake(self):

        client_hs = read_request(self.rfile)
        self.protocol.check_client_handshake(client_hs.headers)

        preamble = 'HTTP/1.1 101 %s\r\n' % status_codes.RESPONSES.get(101)
        self.wfile.write(preamble.encode())
        headers = self.protocol.server_handshake_headers(b"malformed key")
        self.wfile.write(bytes(headers) + b"\r\n")
        self.wfile.flush()
        self.handshake_done = True
Example #3
0
    def handshake(self):

        req = read_request(self.rfile)
        key = self.protocol.check_client_handshake(req.headers)

        preamble = 'HTTP/1.1 101 %s' % status_codes.RESPONSES.get(101)
        self.wfile.write(preamble.encode() + b"\r\n")
        headers = self.protocol.server_handshake_headers(key)
        self.wfile.write(str(headers) + "\r\n")
        self.wfile.flush()
        self.handshake_done = True
Example #4
0
    def handshake(self):

        client_hs = read_request(self.rfile)
        self.protocol.check_client_handshake(client_hs.headers)

        preamble = 'HTTP/1.1 101 %s\r\n' % status_codes.RESPONSES.get(101)
        self.wfile.write(preamble.encode())
        headers = self.protocol.server_handshake_headers(b"malformed key")
        self.wfile.write(bytes(headers) + b"\r\n")
        self.wfile.flush()
        self.handshake_done = True
Example #5
0
 def read_request(self):
     req = http1.read_request(self.client_conn.rfile, body_size_limit=self.config.body_size_limit)
     return HTTPRequest.wrap(req)
Example #6
0
 def read_request(self, lg=None):
     return http1.read_request(self.pathod_handler.rfile)
Example #7
0
 def read_request(self, lg=None):
     return http1.read_request(self.pathod_handler.rfile)