1 --- a/networking/httpd.c
2 +++ b/networking/httpd.c
4 USE_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;)
5 USE_FEATURE_HTTPD_CGI(char *referer;)
6 USE_FEATURE_HTTPD_CGI(char *user_agent;)
7 + USE_FEATURE_HTTPD_CGI(char *http_accept;)
8 + USE_FEATURE_HTTPD_CGI(char *http_accept_language;)
10 off_t file_size; /* -1 - unknown */
11 #if ENABLE_FEATURE_HTTPD_RANGES
13 #define remoteuser (G.remoteuser )
14 #define referer (G.referer )
15 #define user_agent (G.user_agent )
16 +#define http_accept (G.http_accept )
17 +#define http_accept_language (G.http_accept_language)
18 #define file_size (G.file_size )
19 #if ENABLE_FEATURE_HTTPD_RANGES
20 #define range_start (G.range_start )
21 @@ -1383,6 +1387,10 @@
24 setenv1("HTTP_USER_AGENT", user_agent);
26 + setenv1("HTTP_ACCEPT", http_accept);
27 + if (http_accept_language)
28 + setenv1("HTTP_ACCEPT_LANGUAGE", http_accept_language);
30 putenv(xasprintf("CONTENT_LENGTH=%d", post_len));
32 @@ -2020,6 +2028,10 @@
33 referer = xstrdup(skip_whitespace(iobuf + sizeof("Referer:")-1));
34 } else if (STRNCASECMP(iobuf, "User-Agent:") == 0) {
35 user_agent = xstrdup(skip_whitespace(iobuf + sizeof("User-Agent:")-1));
36 + } else if (STRNCASECMP(iobuf, "Accept:") == 0) {
37 + http_accept = xstrdup(skip_whitespace(iobuf + sizeof("Accept:")-1));
38 + } else if (STRNCASECMP(iobuf, "Accept-Language:") == 0) {
39 + http_accept_language = xstrdup(skip_whitespace(iobuf + sizeof("Accept-Language:")-1));
42 #if ENABLE_FEATURE_HTTPD_BASIC_AUTH