From 03561f77e3e97deaaab4aede5a75867554822ae7 Mon Sep 17 00:00:00 2001
From: "Silas S. Brown" <ssb22@cam.ac.uk>
Date: Fri, 4 Dec 2015 22:39:11 +0000
Subject: [PATCH] Update Web Adjuster

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/adjuster@2361 29193198-4895-4776-b068-10539e920549
---
 adjuster.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/adjuster.py b/adjuster.py
index 6cb0bd8..906d23a 100755
--- a/adjuster.py
+++ b/adjuster.py
@@ -1575,9 +1575,8 @@ document.forms[0].i.focus()
                   elif maybeRobots: return self.serveRobots()
                   else: options.auth_error = "auth_error set incorrectly (own_server not set)" # see auth_error help (TODO: is it really a good idea to say this HERE?)
               elif maybeRobots: return self.serveRobots()
-              elif options.auth_error.startswith("http://") or options.auth_error.startswith("https://"):
-                  self.add_nocache_headers() # in case they try the exact same request again after authenticating
-                  return self.redirect(options.auth_error)
+              self.add_nocache_headers() # in case they try the exact same request again after authenticating (unlikely if they add &p=..., but they might come back to the other URL later, and refresh is particularly awkward if we redirect)
+              if options.auth_error.startswith("http://") or options.auth_error.startswith("https://"): return self.redirect(options.auth_error)
               if options.auth_error.startswith("*"): auth_error = options.auth_error[1:]
               else:
                   self.set_status(401)
-- 
GitLab