diff options
| author | 2023-06-18 19:34:35 +0200 | |
|---|---|---|
| committer | 2023-06-18 19:34:35 +0200 | |
| commit | 7eb80e9916e0dde1987c35b528beca91e8a8f24c (patch) | |
| tree | 2b720115af73ec5ed8801c54d41c2633945f5a91 /httpd.c | |
| parent | Avoid checking for deleted entries (starting with '-') in index_gc(). (diff) | |
| download | snac2-7eb80e9916e0dde1987c35b528beca91e8a8f24c.tar.gz snac2-7eb80e9916e0dde1987c35b528beca91e8a8f24c.tar.xz snac2-7eb80e9916e0dde1987c35b528beca91e8a8f24c.zip | |
Renamed the HTTP Basic auth realm to something more informative.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -250,8 +250,10 @@ void httpd_connection(FILE *f) | |||
| 250 | if (status == 303) | 250 | if (status == 303) |
| 251 | headers = xs_dict_append(headers, "location", body); | 251 | headers = xs_dict_append(headers, "location", body); |
| 252 | 252 | ||
| 253 | if (status == 401) | 253 | if (status == 401) { |
| 254 | headers = xs_dict_append(headers, "WWW-Authenticate", "Basic realm=\"IDENTIFY\""); | 254 | xs *www_auth = xs_fmt("Basic realm=\"%s snac login", xs_dict_get(srv_config, "host")); |
| 255 | headers = xs_dict_append(headers, "WWW-Authenticate", www_auth); | ||
| 256 | } | ||
| 255 | 257 | ||
| 256 | if (ctype == NULL) | 258 | if (ctype == NULL) |
| 257 | ctype = "text/html; charset=utf-8"; | 259 | ctype = "text/html; charset=utf-8"; |