1 Index: busybox-1.4.2/networking/httpd.c
2 ===================================================================
3 --- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:34.401746808 +0200
4 +++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:34.588718384 +0200
8 USE_FEATURE_HTTPD_CGI(char *referer;)
9 + USE_FEATURE_HTTPD_CGI(char *user_agent;)
11 const char *configFile;
14 if (cp) *cp = '\0'; /* delete :PORT */
15 setenv1("REMOTE_ADDR", p);
17 + setenv1("HTTP_USER_AGENT", config->user_agent);
18 #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
19 setenv_long("REMOTE_PORT", config->port);
22 content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1));
23 } else if ((STRNCASECMP(buf, "Referer:") == 0)) {
24 config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1));
25 + } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) {
26 + config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1));