summaryrefslogtreecommitdiff
path: root/src/cgi.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2015-05-28 21:54:10 +0200
committerJoel Klinghed <the_jk@yahoo.com>2015-05-28 21:54:57 +0200
commitfb659a41cfe5523c62fd6993acddab120ccb0758 (patch)
treede4f047509e878864a114a0fe62d00f555a00dda /src/cgi.cc
parente0e50d64326887ed1403e90479244d9baba972d1 (diff)
Fix some mistakes
Diffstat (limited to 'src/cgi.cc')
-rw-r--r--src/cgi.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/cgi.cc b/src/cgi.cc
index edca4fe..5f86aac 100644
--- a/src/cgi.cc
+++ b/src/cgi.cc
@@ -4,7 +4,6 @@
#if HAVE_FASTCGI
#include <fcgio.h>
#endif
-#include <iostream>
#include <memory>
#include "cgi.hh"
@@ -76,11 +75,11 @@ public:
auto p = getparam("REQUEST_METHOD");
if (p) {
auto method = ascii_tolower(p);
- if (method.compare("GET") == 0) return GET;
- if (method.compare("POST") == 0) return POST;
- if (method.compare("HEAD") == 0) return HEAD;
- if (method.compare("PUT") == 0) return PUT;
- if (method.compare("TRACE") == 0) return TRACE;
+ if (method.compare("get") == 0) return GET;
+ if (method.compare("post") == 0) return POST;
+ if (method.compare("head") == 0) return HEAD;
+ if (method.compare("put") == 0) return PUT;
+ if (method.compare("trace") == 0) return TRACE;
}
return UNKNOWN;
}
@@ -91,6 +90,10 @@ public:
}
protected:
+ CGIImpl()
+ : have_post_data_(false) {
+ }
+
virtual const char* getparam(const char* name) = 0;
private: