mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Don't return a Basic realm if there is no body.
This commit is contained in:
parent
c648fab797
commit
2e9e2ebd18
2
httpd.c
2
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"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user