def _auth_type_from_header(header):
if '<STR_LIT>' in header:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>elif '<STR_LIT>' in header:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return None<EOL>
Given a WWW-Authenticate or Proxy-Authenticate header, returns the
authentication type to use. We prefer NTLM over Negotiate if the server
suppports it.