diff options
-rw-r--r-- | icespider/fcgi/Jamfile.jam | 3 | ||||
-rw-r--r-- | icespider/fcgi/cgiRequestBase.cpp | 5 | ||||
-rw-r--r-- | icespider/unittests/Jamfile.jam | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/icespider/fcgi/Jamfile.jam b/icespider/fcgi/Jamfile.jam index c607ed1..cf0e7af 100644 --- a/icespider/fcgi/Jamfile.jam +++ b/icespider/fcgi/Jamfile.jam @@ -3,7 +3,10 @@ lib fcgi++ : : <name>fcgi++ ; lib icespider-fcgi : [ glob-tree *.cpp : bin ] + ../common/http.ice : + <slicer>pure + <allow-ice>yes <library>fcgi <library>fcgi++ <library>..//core diff --git a/icespider/fcgi/cgiRequestBase.cpp b/icespider/fcgi/cgiRequestBase.cpp index 922ba9a..85f7966 100644 --- a/icespider/fcgi/cgiRequestBase.cpp +++ b/icespider/fcgi/cgiRequestBase.cpp @@ -3,6 +3,7 @@ #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/classification.hpp> #include <util.h> +#include <slicer/modelPartsTypes.h> namespace ba = boost::algorithm; @@ -75,7 +76,9 @@ namespace IceSpider { HttpMethod CgiRequestBase::getRequestMethod() const { - return HttpMethod::GET; + auto i = envmap.find("REQUEST_METHOD"); + return Slicer::ModelPartForEnum<HttpMethod>::lookup( + std::string(std::get<0>(i->second), std::get<1>(i->second))); } OptionalString diff --git a/icespider/unittests/Jamfile.jam b/icespider/unittests/Jamfile.jam index 3ce12f0..779aed7 100644 --- a/icespider/unittests/Jamfile.jam +++ b/icespider/unittests/Jamfile.jam @@ -81,12 +81,16 @@ run run testFcgi.cpp ../fcgi/cgiRequestBase.cpp + ../common/http.ice : : : <define>BOOST_TEST_DYN_LINK + <slicer>pure + <allow-ice>yes <library>testCommon <library>../common//icespider-common <library>../core//icespider-core <library>boost_system + <library>slicer <include>../fcgi : testFcgi ; |