9a9a373
--- a/urllib2_kerberos.py
9a9a373
+++ b/urllib2_kerberos.py
9a9a373
@@ -34,6 +34,7 @@ class AbstractKerberosAuthHandler:
9a9a373
         """checks for "Negotiate" in proper auth header
9a9a373
         """
9a9a373
         authreqs = headers.getheaders(self.auth_header)
9a9a373
+        log.debug('authreqs = {}'.format(authreqs))
9a9a373
9a9a373
         if authreqs:
9a9a373
9a9a373
@@ -126,7 +127,8 @@ class AbstractKerberosAuthHandler:
9a9a373
             req.add_unredirected_header(self.authz_header, neg_hdr)
9a9a373
             resp = self.parent.open(req)
9a9a373
9a9a373
-            self.authenticate_server(resp.info())
9a9a373
+            if resp.getcode() != 200:
9a9a373
+                self.authenticate_server(resp.info())
9a9a373
9a9a373
             return resp
9a9a373