Added more essential NAS modules for NSLU2, NAS100d and DSMG600RevA profiles
[openwrt.git] / package / busybox / patches / 330-httpd_user_agent.patch
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
5 @@ -137,6 +137,7 @@
6 const char *query;
7
8 USE_FEATURE_HTTPD_CGI(char *referer;)
9 + USE_FEATURE_HTTPD_CGI(char *user_agent;)
10
11 const char *configFile;
12
13 @@ -1066,6 +1067,7 @@
14 if (cp) *cp = '\0'; /* delete :PORT */
15 setenv1("REMOTE_ADDR", p);
16 }
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);
20 #endif
21 @@ -1647,6 +1649,8 @@
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));
27 }
28 #endif
29
This page took 0.041037 seconds and 5 git commands to generate.