diff options
| author | 2023-06-24 08:29:29 +0200 | |
|---|---|---|
| committer | 2023-06-24 08:29:29 +0200 | |
| commit | 2f3ed55790f5d929a47c9ec956f6bd61a95003f0 (patch) | |
| tree | 564cc92b147c43d020ea49373d6c21e50044fd5c /httpd.c | |
| parent | Fixed missing end quote in the WWW-Authenticate header. (diff) | |
| download | penes-snac2-2f3ed55790f5d929a47c9ec956f6bd61a95003f0.tar.gz penes-snac2-2f3ed55790f5d929a47c9ec956f6bd61a95003f0.tar.xz penes-snac2-2f3ed55790f5d929a47c9ec956f6bd61a95003f0.zip | |
The WWW-Authenticate real also includes the user.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -251,7 +251,9 @@ void httpd_connection(FILE *f) | |||
| 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 | xs *www_auth = xs_fmt("Basic realm=\"%s snac login\"", xs_dict_get(srv_config, "host")); | 254 | xs *www_auth = xs_fmt("Basic realm=\"@%s@%s snac login\"", |
| 255 | body, xs_dict_get(srv_config, "host")); | ||
| 256 | |||
| 255 | headers = xs_dict_append(headers, "WWW-Authenticate", www_auth); | 257 | headers = xs_dict_append(headers, "WWW-Authenticate", www_auth); |
| 256 | } | 258 | } |
| 257 | 259 | ||