[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cppserv
Subject:    getting rid of boost dep in API
From:       "Ilya A. Volynets-Evenbakh" <ilya () total-knowledge ! com>
Date:       2006-03-06 2:58:39
Message-ID: 440BA55F.40801 () total-knowledge ! com
[Download RAW message or body]

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
http://www.total-knowledge.com


["boost-1.diff" (text/plain)]

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);
     else
         resp.sendError(HttpServletResponse::SC_BAD_REQUEST, msg);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic