Clinton
Clinton

Reputation: 23135

How do I get CGIHTTPServer to ask for user/pass

I just want to start a CGI HTTP Server in Python, that asks for user/pass. How can I do this?

The HTTP Basic authentication (with a browser popup box that asks for name/password) will be fine (and probably preferred).

Upvotes: 1

Views: 693

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799110

Returning a status code of 401 and a WWW-Authenticate header will tell the browser to prompt the user for credentials. See RFC 2617 for details.

Upvotes: 1

Related Questions