Home Projects Jobs Clientele Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting rid of boost dep in API

As we discussed previously, it would be nice
to make public API completely independant of
any external libraries. Attached is first bite (or even
nib) at that - it gets rid of only boost reference
in src/

Ilya A. Volynets-Evenbakh
Total Knowledge. CTO

Index: mod_servlet/servlet/src/HttpServlet.cpp
--- mod_servlet/servlet/src/HttpServlet.cpp	(revision 5)
+++ mod_servlet/servlet/src/HttpServlet.cpp	(working copy)
@@ -56,7 +56,6 @@
 #include <servlet/HttpServletResponse.h>
 #include <servlet/ServletRequest.h>
 #include <servlet/ServletResponse.h>
-#include <boost/algorithm/string/predicate.hpp>
 #include <stdexcept>
 using namespace std;
@@ -68,7 +67,7 @@
     const string protocol = req.getProtocol();
     const string msg = "Method "+method_name+" not supported";
-    if (boost::ends_with(protocol, "1.1"))
+    if (protocol.rfind("1.1")!=std::string::npos)
         resp.sendError(HttpServletResponse::SC_METHOD_NOT_ALLOWED, msg);
         resp.sendError(HttpServletResponse::SC_BAD_REQUEST, msg);

Authoright © Total Knowledge: 2001-2008