aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/http
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-03-26 12:02:23 +0100
committerAngelo Mantellini <angelo.mantellini@cisco.com>2020-03-31 11:35:33 +0200
commit3718e549ee31ac764b327bbf3d6e51dd7e224b46 (patch)
tree5bfc2147e348a5fd4b0291ad458dacf3feececc0 /libtransport/src/http
parent4b36dc3d5dd3ec206aa24d49557c61ae5886be2b (diff)
[HICN-581] update hicn stack to support windows, again
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: Ic5cfeae600fde8140a076807fa1e411da1933a02
Diffstat (limited to 'libtransport/src/http')
-rw-r--r--libtransport/src/http/response.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/libtransport/src/http/response.cc b/libtransport/src/http/response.cc
index ba0acd1ac..409992835 100644
--- a/libtransport/src/http/response.cc
+++ b/libtransport/src/http/response.cc
@@ -16,8 +16,8 @@
#include <hicn/transport/errors/errors.h>
#include <hicn/transport/http/response.h>
-#include <experimental/algorithm>
-#include <experimental/functional>
+#include <algorithm>
+#include <functional>
#include <cstring>
@@ -62,11 +62,9 @@ std::size_t HTTPResponse::parseHeaders(const uint8_t *buffer, std::size_t size,
const char *crlf2 = "\r\n\r\n";
const char *begin = (const char *)buffer;
const char *end = begin + size;
- auto it =
- std::experimental::search(begin, end,
- std::experimental::make_boyer_moore_searcher(
- crlf2, crlf2 + strlen(crlf2)));
-
+ const char *begincrlf2 = (const char *)crlf2;
+ const char *endcrlf2 = begincrlf2 + strlen(crlf2);
+ auto it = std::search(begin, end, begincrlf2, endcrlf2);
if (it != end) {
std::stringstream ss;
ss.str(std::string(begin, it));
@@ -135,4 +133,4 @@ const std::string &HTTPResponse::getStatusString() const {
} // namespace http
-} // namespace transport \ No newline at end of file
+} // namespace transport