s4:lib/http: remove indentation level from http_parse_auth_response()
authorStefan Metzmacher <metze@samba.org>
Thu, 20 Jul 2017 12:44:51 +0000 (14:44 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 7 Aug 2017 13:20:02 +0000 (15:20 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/lib/http/http_auth.c

index d134bd6521999f4cd2e20c254cdc7995fc0f9a29..701d9b3bae3eabe267f1416766b3e79393e6b707 100644 (file)
@@ -61,17 +61,19 @@ static NTSTATUS http_parse_auth_response(enum http_auth_method auth,
        struct http_header *h;
 
        for (h = auth_response->headers; h != NULL; h = h->next) {
-               if (strncasecmp(h->key, "WWW-Authenticate", 16) == 0) {
-                       switch (auth) {
-                       case HTTP_AUTH_NTLM:
-                               if (strncasecmp(h->value, "NTLM ", 5) == 0) {
-                                       *in = data_blob_string_const(h->value);
-                                       return NT_STATUS_OK;
-                               }
-                               break;
-                       default:
-                               break;
+               if (strncasecmp(h->key, "WWW-Authenticate", 16) != 0) {
+                       continue;
+               }
+
+               switch (auth) {
+               case HTTP_AUTH_NTLM:
+                       if (strncasecmp(h->value, "NTLM ", 5) == 0) {
+                               *in = data_blob_string_const(h->value);
+                               return NT_STATUS_OK;
                        }
+                       break;
+               default:
+                       break;
                }
        }