Iterate passed parameter lists in correct order We were using reverse iteraters, which, among other things, swapped the keys and values. Change-Id: I9dc18c6f4c75bcf5bc12e2a8245f74b49b12a0b5 Test: Verified via weaved Bug: 27774023
diff --git a/libwebserv/binder_request_impl.cc b/libwebserv/binder_request_impl.cc index b0042de..2a81e29 100644 --- a/libwebserv/binder_request_impl.cc +++ b/libwebserv/binder_request_impl.cc
@@ -31,15 +31,15 @@ CHECK(!(query_params.size() % 2)); CHECK(!(post_params.size() % 2)); - for (auto it = headers.crbegin(); it != headers.crend(); it += 2) { + for (auto it = headers.cbegin(); it != headers.cend(); it += 2) { headers_.emplace(*it, *(it + 1)); } - for (auto it = query_params.crbegin(); it != query_params.crend(); it += 2) { + for (auto it = query_params.cbegin(); it != query_params.cend(); it += 2) { get_data_.emplace(*it, *(it + 1)); } - for (auto it = post_params.crbegin(); it != post_params.crend(); it += 2) { + for (auto it = post_params.cbegin(); it != post_params.cend(); it += 2) { post_data_.emplace(*it, *(it + 1)); } }