I need to get HTTP request header for TRACE?

170 views Asked by At

I'm using python 2.7 and I want to implement the do_TRACE function for my HTTP server and I'm using the BaseHTTPServer library. I want to get the request header. How can I get it? How can I get the length of it? Please help me...

    def do_TRACE(self):
        self.send_response(200)
        self.send_header('Server', socket.gethostname())
        self.send_header('Connection', 'close')
        self.send_header('Content-Type', )
        self.send_header('Content-Length')
        self.end_headers()
0

There are 0 answers