Fossil SCM

Report all available CGI environment variables on the test_env page.

drh 2013-08-24 22:33 trunk
Commit f9c2dec2ec70f51df6183e08f145d5cf0c5dd9be
1 file changed +10
+10
--- src/style.c
+++ src/style.c
@@ -1156,15 +1156,25 @@
11561156
void page_test_env(void){
11571157
char c;
11581158
int i;
11591159
int showAll;
11601160
char zCap[30];
1161
+ static const char *azCgiVars[] = {
1162
+ "COMSPEC", "DOCUMENT_ROOT", "GATEWAY_INTERFACE",
1163
+ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",
1164
+ "HTTP_ACCEPT_LANGUAGE", "HTTP_CONNECTION", "HTTP_HOST",
1165
+ "HTTP_USER_AGENT", "HTTP_REFERER", "PATH_INFO", "PATH_TRANSLATED",
1166
+ "QUERY_STRING", "REMOTE_ADDR", "REMOTE_PORT", "REQUEST_METHOD",
1167
+ "REQUEST_URI", "SCRIPT_FILENAME", "SCRIPT_NAME", "SERVER_PROTOCOL",
1168
+ };
1169
+
11611170
login_check_credentials();
11621171
if( !g.perm.Admin && !g.perm.Setup && !db_get_boolean("test_env_enable",0) ){
11631172
login_needed();
11641173
return;
11651174
}
1175
+ for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]);
11661176
style_header("Environment Test");
11671177
showAll = atoi(PD("showall","0"));
11681178
if( !showAll ){
11691179
style_submenu_element("Show Cookies", "Show Cookies",
11701180
"%s/test_env?showall=1", g.zTop);
11711181
--- src/style.c
+++ src/style.c
@@ -1156,15 +1156,25 @@
1156 void page_test_env(void){
1157 char c;
1158 int i;
1159 int showAll;
1160 char zCap[30];
 
 
 
 
 
 
 
 
 
1161 login_check_credentials();
1162 if( !g.perm.Admin && !g.perm.Setup && !db_get_boolean("test_env_enable",0) ){
1163 login_needed();
1164 return;
1165 }
 
1166 style_header("Environment Test");
1167 showAll = atoi(PD("showall","0"));
1168 if( !showAll ){
1169 style_submenu_element("Show Cookies", "Show Cookies",
1170 "%s/test_env?showall=1", g.zTop);
1171
--- src/style.c
+++ src/style.c
@@ -1156,15 +1156,25 @@
1156 void page_test_env(void){
1157 char c;
1158 int i;
1159 int showAll;
1160 char zCap[30];
1161 static const char *azCgiVars[] = {
1162 "COMSPEC", "DOCUMENT_ROOT", "GATEWAY_INTERFACE",
1163 "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",
1164 "HTTP_ACCEPT_LANGUAGE", "HTTP_CONNECTION", "HTTP_HOST",
1165 "HTTP_USER_AGENT", "HTTP_REFERER", "PATH_INFO", "PATH_TRANSLATED",
1166 "QUERY_STRING", "REMOTE_ADDR", "REMOTE_PORT", "REQUEST_METHOD",
1167 "REQUEST_URI", "SCRIPT_FILENAME", "SCRIPT_NAME", "SERVER_PROTOCOL",
1168 };
1169
1170 login_check_credentials();
1171 if( !g.perm.Admin && !g.perm.Setup && !db_get_boolean("test_env_enable",0) ){
1172 login_needed();
1173 return;
1174 }
1175 for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]);
1176 style_header("Environment Test");
1177 showAll = atoi(PD("showall","0"));
1178 if( !showAll ){
1179 style_submenu_element("Show Cookies", "Show Cookies",
1180 "%s/test_env?showall=1", g.zTop);
1181

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button