Procházet zdrojové kódy

Don't return a Basic realm if there is no body.

default před 2 roky
rodič
revize
2e9e2ebd18
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      httpd.c

+ 1 - 1
httpd.c

@@ -406,7 +406,7 @@ void httpd_connection(FILE *f)
     if (status == HTTP_STATUS_SEE_OTHER)
         headers = xs_dict_append(headers, "location", body);
 
-    if (status == HTTP_STATUS_UNAUTHORIZED) {
+    if (status == HTTP_STATUS_UNAUTHORIZED && body) {
         xs *www_auth = xs_fmt("Basic realm=\"@%s@%s snac login\"",
                                 body, xs_dict_get(srv_config, "host"));