diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2015-05-28 21:54:10 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2015-05-28 21:54:57 +0200 |
| commit | fb659a41cfe5523c62fd6993acddab120ccb0758 (patch) | |
| tree | de4f047509e878864a114a0fe62d00f555a00dda /src/cgi.cc | |
| parent | e0e50d64326887ed1403e90479244d9baba972d1 (diff) | |
Fix some mistakes
Diffstat (limited to 'src/cgi.cc')
| -rw-r--r-- | src/cgi.cc | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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: |
