USE_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;)
USE_FEATURE_HTTPD_CGI(char *referer;)
USE_FEATURE_HTTPD_CGI(char *user_agent;)
+ USE_FEATURE_HTTPD_CGI(char *host;)
USE_FEATURE_HTTPD_CGI(char *http_accept;)
USE_FEATURE_HTTPD_CGI(char *http_accept_language;)
#define remoteuser (G.remoteuser )
#define referer (G.referer )
#define user_agent (G.user_agent )
+#define host (G.host )
#define http_accept (G.http_accept )
#define http_accept_language (G.http_accept_language)
#define file_size (G.file_size )
#endif
if (referer)
setenv1("HTTP_REFERER", referer);
+ setenv1("HTTP_HOST", host); /* set to "" if NULL */
xpiped_pair(fromCgi);
xpiped_pair(toCgi);
referer = xstrdup(skip_whitespace(iobuf + sizeof("Referer:")-1));
} else if (STRNCASECMP(iobuf, "User-Agent:") == 0) {
user_agent = xstrdup(skip_whitespace(iobuf + sizeof("User-Agent:")-1));
+ } else if (STRNCASECMP(iobuf, "Host:") == 0) {
+ host = xstrdup(skip_whitespace(iobuf + sizeof("Host:")-1));
} else if (STRNCASECMP(iobuf, "Accept:") == 0) {
http_accept = xstrdup(skip_whitespace(iobuf + sizeof("Accept:")-1));
} else if (STRNCASECMP(iobuf, "Accept-Language:") == 0) {