1 diff -Nur busybox-1.1.1/networking/httpd.c busybox-1.1.1-owrt/networking/httpd.c
2 --- busybox-1.1.1/networking/httpd.c 2006-04-01 19:42:36.000000000 +0200
3 +++ busybox-1.1.1-owrt/networking/httpd.c 2006-04-01 19:43:59.000000000 +0200
7 USE_FEATURE_HTTPD_CGI(char *referer;)
8 + USE_FEATURE_HTTPD_CGI(char *user_agent;)
10 const char *configFile;
13 addEnv("SERVER", "PROTOCOL", "HTTP/1.0");
14 addEnv("GATEWAY_INTERFACE", "", "CGI/1.1");
15 addEnv("REMOTE", "ADDR", config->rmt_ip_str);
16 + addEnv("HTTP","USER_AGENT", config->user_agent);
17 #ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
20 @@ -1771,6 +1773,10 @@
21 for(test = buf + 8; isspace(*test); test++)
23 config->referer = strdup(test);
24 + } else if ((strncasecmp(buf, "User-Agent:",11) ==0)) {
25 + for(test = buf + 11; isspace(*test); test++)
27 + config->user_agent = strdup(test);