diff options
| -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"; |