Getting username and passwd from IE

Martin Beckett mgb at mgbeckett.com
Wed Mar 24 13:46:33 CET 2004


I have a CGI server class derived from
BaseHTTPServer.BaseHTTPRequestHandler
which needs to get a username and passwd from a client.
This is fine unless the client is Internet Explorer - which I
understand only sends a username/passwd when challenged.
I have code something like:

  if decode_authorization(self.headers):
     ....
  else:
     self.send_response(401)
     self.end_headers()
     return

But IE ingnores it, if I use send_error() IE prints the error message
instead of sending the authorization.

  Any ideas ?



More information about the Python-list mailing list