diff options
| author | 2024-06-09 17:04:34 +0200 | |
|---|---|---|
| committer | 2024-06-09 17:04:34 +0200 | |
| commit | 2e9e2ebd18d6b617184d433ca0d2e5fdd3889a03 (patch) | |
| tree | 72ca981460b6ed05c921805c6b7f2869aa098ad8 /httpd.c | |
| parent | mastoapi: Reverted empty ctype rejection. (diff) | |
| download | penes-snac2-2e9e2ebd18d6b617184d433ca0d2e5fdd3889a03.tar.gz penes-snac2-2e9e2ebd18d6b617184d433ca0d2e5fdd3889a03.tar.xz penes-snac2-2e9e2ebd18d6b617184d433ca0d2e5fdd3889a03.zip | |
Don't return a Basic realm if there is no body.
Diffstat (limited to '')
| -rw-r--r-- | httpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -406,7 +406,7 @@ void httpd_connection(FILE *f) | |||
| 406 | if (status == HTTP_STATUS_SEE_OTHER) | 406 | if (status == HTTP_STATUS_SEE_OTHER) |
| 407 | headers = xs_dict_append(headers, "location", body); | 407 | headers = xs_dict_append(headers, "location", body); |
| 408 | 408 | ||
| 409 | if (status == HTTP_STATUS_UNAUTHORIZED) { | 409 | if (status == HTTP_STATUS_UNAUTHORIZED && body) { |
| 410 | xs *www_auth = xs_fmt("Basic realm=\"@%s@%s snac login\"", | 410 | xs *www_auth = xs_fmt("Basic realm=\"@%s@%s snac login\"", |
| 411 | body, xs_dict_get(srv_config, "host")); | 411 | body, xs_dict_get(srv_config, "host")); |
| 412 | 412 | ||