root/trunk/freewrt/package/busybox/patches/330-httpd_user_agent.patch
| Revision 3296, 1.1 kB (checked in by tg, 5 years ago) |
|---|
-
busybox-1.4.1/networking/httpd.c
old new 137 137 const char *query; 138 138 139 139 USE_FEATURE_HTTPD_CGI(char *referer;) 140 USE_FEATURE_HTTPD_CGI(char *user_agent;) 140 141 141 142 const char *configFile; 142 143 … … 1066 1067 if (cp) *cp = '\0'; /* delete :PORT */ 1067 1068 setenv1("REMOTE_ADDR", p); 1068 1069 } 1070 setenv1("HTTP_USER_AGENT", config->user_agent); 1069 1071 #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV 1070 1072 setenv_long("REMOTE_PORT", config->port); 1071 1073 #endif … … 1629 1631 content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1)); 1630 1632 } else if ((STRNCASECMP(buf, "Referer:") == 0)) { 1631 1633 config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1)); 1634 } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) { 1635 config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1)); 1632 1636 } 1633 1637 #endif 1634 1638
Note: See TracBrowser for help on using the browser.


