summaryrefslogtreecommitdiff
path: root/src/cgi.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2015-06-03 00:08:30 +0200
committerJoel Klinghed <the_jk@yahoo.com>2015-06-03 00:08:30 +0200
commit823dc403a9b56e00be4982d0082d30b8df5e53d6 (patch)
tree7cceaf19fa709c5c9adcde4de4819581930321f2 /src/cgi.cc
parent0cbc7dd8dd00c92570f35f901b820a1ea96acdf0 (diff)
Add CGI::get_data utility method
Diffstat (limited to 'src/cgi.cc')
-rw-r--r--src/cgi.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cgi.cc b/src/cgi.cc
index 5f86aac..b2467f3 100644
--- a/src/cgi.cc
+++ b/src/cgi.cc
@@ -173,6 +173,12 @@ private:
} // namespace
+void CGI::get_data(std::map<std::string,std::string>* data) {
+ if (post_data(data)) return;
+ query_data(data);
+}
+
+
int CGI::run(std::function<bool(CGI*)> handle_request) {
#if HAVE_FASTCGI
if (!FCGX_IsCGI()) {