简体   繁体   中英

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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM