#if CGI_LOGGING
f = fopen("/tmp/cgi.log", "a");
- if (f) fprintf(f,"\n[Date: %s]\n", http_timestring(time(NULL)));
+ if (f) fprintf(f,"\n[Date: %s %s (%s)]\n",
+ http_timestring(time(NULL)),
+ client_name(1), client_addr(1));
#endif
/* we are a mini-web server. We need to read the request from stdin
}
return getenv("REMOTE_ADDR");
}
+
+
+/***************************************************************************
+return True if the request was a POST
+ ***************************************************************************/
+BOOL cgi_waspost(void)
+{
+ if (baseurl) {
+ return request_post;
+ }
+ return strequal(getenv("REQUEST_METHOD"), "POST");
+}