From 802d0628bdc46deca2ccaac873a1de2abb4423c2 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 16 Sep 2015 15:52:13 +0200 Subject: [PATCH] Force close the keep alive when sending a 401 Work around a Qt issue where Qt timeout instead of handling the 401 this happen only for the first query send by the client. --- gns3server/web/route.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gns3server/web/route.py b/gns3server/web/route.py index fbf3940e..4511cbc2 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -109,6 +109,9 @@ class Route(object): response = Response(request=request, route=route) response.set_status(401) response.headers["WWW-Authenticate"] = 'Basic realm="GNS3 server"' + # Force close the keep alive. Work around a Qt issue where Qt timeout instead of handling the 401 + # this happen only for the first query send by the client. + response.force_close() return response @classmethod