[ACCEPTED]-Getting Host field from HTTP request in BaseHTTPRequestHandler-basehttpserver
Accepted answer
The attribute self.headers is a dictionary-like structure, so 2 you can do this:
def do_GET(self):
host = self.headers.get('Host')
When the header does not 1 exist, None
is returned.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.