From 6724398b825bf0bdaf78bd2a8a084fc055e22e28 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 18 Dec 2017 08:04:09 +0800 Subject: [PATCH] include #include --- src/tools.cpp | 10 +++++----- src/tools.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools.cpp b/src/tools.cpp index ac90da5..78604cd 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -1010,18 +1010,18 @@ parse_crow_post_data(const string& req_body) bool result = url_decode(req_body, tmp); if (result) { - boost::algorithm::split(vec, tmp, [](char x) {return x == '&'; }); + boost::algorithm::split(vec, tmp, + [](char x) {return x == '&'; + }); + for(auto &it : vec) { auto pos = it.find("="); + if (pos != string::npos) - { body[it.substr(0, pos)] = it.substr(pos + 1); - } else - { break; - } } } return body; diff --git a/src/tools.h b/src/tools.h index 1cc3431..dbd96a0 100644 --- a/src/tools.h +++ b/src/tools.h @@ -24,7 +24,7 @@ #include #include #include - +#include #include #include