Revision 81b59aaf

b/lib/http/auth.py
101 101
    """
102 102
    realm = self.GetAuthRealm(req)
103 103

  
104
    # Authentication required?
105
    if realm is None:
104
    # Authentication not required, and no credentials given?
105
    if realm is None and http.HTTP_AUTHORIZATION not in req.request_headers:
106 106
      return
107 107

  
108
    if realm is None: # in case we don't require auth but someone
109
                      # passed the crendentials anyway
110
      realm = "Unspecified"
111

  
108 112
    # Check "Authorization" header
109 113
    if self._CheckAuthorization(req):
110 114
      # User successfully authenticated

Also available in: Unified diff