here is a python script I use to force the error:
import base64, httplib
base64string = base64.encodestring('%s:%s' % ("<uname>", "<password>"))[:-1] headers = { "Authorization" : "Basic %s" % base64string } while 1: conn = httplib.HTTPSConnection("<host>") conn.request("GET", "/dist/test.txt", headers=headers) response = conn.getresponse() try: if response.status != 200: print response.getheaders(), response.read() break else: print "OK" finally: conn.close()
hope it helps
here is a python script I use to force the error:
import base64, httplib
base64string = base64. encodestring( '%s:%s' % ("<uname>", "<password>"))[:-1] HTTPSConnection ("<host> ") request( "GET", "/dist/test.txt", headers=headers) getheaders( ), response.read()
headers = { "Authorization" : "Basic %s" % base64string }
while 1:
conn = httplib.
conn.
response = conn.getresponse()
try:
if response.status != 200:
print response.
break
else: print "OK"
finally: conn.close()
hope it helps