diff --git a/httpbin/core.py b/httpbin/core.py index 1f2861c..3fdf8c9 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -356,8 +356,10 @@ def digest_auth(qop=None, user='user', passwd='passwd'): auth.set_digest('me@kennethreitz.com', nonce, opaque=opaque, qop=('auth', 'auth-int') if qop is None else (qop, )) response.headers['WWW-Authenticate'] = auth.to_header() + response.headers['Set-Cookie'] = 'fake=fake_value' return response - elif not check_digest_auth(user, passwd): + elif not (check_digest_auth(user, passwd) and + request.headers.get('Cookie')): return status_code(401) return jsonify(authenticated=True, user=user) diff --git a/manage.py b/manage.py index 7f7d659..07e4fd8 100755 --- a/manage.py +++ b/manage.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from httpbin import app -from flaskext.script import Manager, Command +from flask.ext.script import Manager, Command manager = Manager(app) @@ -15,4 +15,4 @@ def hello(): if __name__ == "__main__": - manager.run() \ No newline at end of file + manager.run()