对不起,我会说一点英语。我有一个js代码。
url = '/auth'
var http_request = window.XDomainRequest || window.XMLHttpRequest;
http_request = new http_request;
http_request.open( "post", url, true, 'jack', 'pass_jack' );
http_request.send();和python BaseHTTPServer
def do_POST(self):
if self.path == '/auth':如何在python中检查用户名和密码?
发布于 2013-04-15 21:04:59
XMLHttpRequest设置Authentication标头,您需要解析该标头:
auth = self.headers['Authentication']有关用户代理如何通过该标头与服务器交互的详细信息,请参阅RFC 2617 (HTTP Authentication: Basic and Digest Access Authentication)。
https://stackoverflow.com/questions/16012804
复制相似问题