mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 16:53:37 +00:00
Don't return a Basic realm if there is no body.
This commit is contained in:
parent
c648fab797
commit
2e9e2ebd18
1 changed files with 1 additions and 1 deletions
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 a new issue