Skip to content
Snippets Groups Projects
Unverified Commit ef8d3130 authored by Vladimir Homutov's avatar Vladimir Homutov Committed by GitHub
Browse files

Merge pull request #73 from LPby/master

Fix for Python3
parents a3a04fac 48cdd5e5
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@ class AppHandler(BaseHTTPRequestHandler):
<tr>
<td>Username: <input type="text" name="username"/></td>
<tr>
<td>Password: <input type="text" name="password"/></td>
<td>Password: <input type="password" name="password"/></td>
<tr>
<td><input type="submit" value="Login"></td>
</table>
......@@ -119,6 +119,8 @@ class AppHandler(BaseHTTPRequestHandler):
#
# WARNING WARNING WARNING
enc = base64.b64encode(ensure_bytes(user + ':' + passwd))
if sys.version_info.major == 3:
enc = enc.decode()
self.send_header('Set-Cookie', b'nginxauth=' + enc + b'; httponly')
self.send_header('Location', target)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment