Show upgrade protocols

main
Bob Mottram 2020-02-19 15:15:06 +00:00
parent 9ca20f92f2
commit edc34a8a9a
1 changed files with 4 additions and 1 deletions

View File

@ -932,6 +932,9 @@ class PubServer(BaseHTTPRequestHandler):
else: else:
if self.headers.get('Connection'): if self.headers.get('Connection'):
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism # https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism
if self.headers.get('Upgrade'):
print('HTTP Connection request: '+self.headers['Upgrade'])
else:
print('HTTP Connection request: '+self.headers['Connection']) print('HTTP Connection request: '+self.headers['Connection'])
self._200() self._200()
else: else: