Python3 using requests to grab HTTP Auth Data

Νίκος Βέργος me.on.nzt at gmail.com
Wed Feb 1 19:22:54 EST 2017


================================
# Give user the file requested
	
print('''<meta http-equiv="refresh" content="5;url=http://superhost.gr/data/files/%s">''' % realfile)
	
authuser = os.environ.get( 'REMOTE_USER', 'Άγνωστος' )
print( authuser )
================================

Trying this, feels liek i'm almost there except that when printing the value of authuser variable it default to "Άγνωστος" meaning not there.

is there any other way i can grab what the user gave a auth login info?


More information about the Python-list mailing list