snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 2e9e2ebd18d6b617184d433ca0d2e5fdd3889a03
parent c648fab797456a49d8bc50f3e17123c66f08bf0e
Author: default <nobody@localhost>
Date:   Sun,  9 Jun 2024 17:04:34 +0200

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

Diffstat:
Mhttpd.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpd.c b/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"));