tools/android/kerberos/negotiate_test_server.py
def do_GET(self):
    """Respond to a GET request."""
    print('Path: ' + self.path)
    print(self.headers)
    auth_header = self.headers.getheader('Authorization')

    if not auth_header:
      self.send_response(401)
      self.send_header('WWW-Authenticate', 'negotiate')
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(FAILURE_HTML)
    elif not auth_header.startswith('Negotiate '):
      self.send_response(403)
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(WRONG_HEADER_HTML % auth_header)
    else:
      self.send_response(200)
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(SUCCESS_HTML)
Respond to a GET request.
Respond to a GET request.
Respond to a GET request .
def do_GET(self):
    print('Path: ' + self.path)
    print(self.headers)
    auth_header = self.headers.getheader('Authorization')
    if not auth_header:
      self.send_response(401)
      self.send_header('WWW-Authenticate', 'negotiate')
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(FAILURE_HTML)
    elif not auth_header.startswith('Negotiate '):
      self.send_response(403)
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(WRONG_HEADER_HTML % auth_header)
    else:
      self.send_response(200)
      self.send_header('Content-type', 'text/html')
      self.end_headers()
      self.wfile.write(SUCCESS_HTML)
def do_GET ( self ) : print ( 'Path: ' + self . path ) print ( self . headers ) auth_header = self . headers . getheader ( 'Authorization' ) if not auth_header : self . send_response ( 401 ) self . send_header ( 'WWW-Authenticate' , 'negotiate' ) self . send_header ( 'Content-type' , 'text/html' ) self . end_headers ( ) self . wfile . write ( FAILURE_HTML ) elif not auth_header . startswith ( 'Negotiate ' ) : self . send_response ( 403 ) self . send_header ( 'Content-type' , 'text/html' ) self . end_headers ( ) self . wfile . write ( WRONG_HEADER_HTML % auth_header ) else : self . send_response ( 200 ) self . send_header ( 'Content-type' , 'text/html' ) self . end_headers ( ) self . wfile . write ( SUCCESS_HTML )
Respond to a GET request.
Respond to a GET request .
"""Respond to a GET request."""
self