Skip to content

Commit 1cbdf2d

Browse files
committed
Added a normalize function in a new file uri/normalize.hpp
2 parents f2825ca + 0c90ce0 commit 1cbdf2d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

boost/network/protocol/http/server/async_connection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ namespace boost { namespace network { namespace http {
447447
thread_pool().post(
448448
boost::bind(
449449
&Handler::operator(),
450-
handler,
450+
&handler,
451451
cref(request_),
452452
async_connection<Tag,Handler>::shared_from_this()));
453453
return;

libs/network/test/uri/uri_test.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<<<<<<< HEAD
12
// Copyright 2009, 2010, 2011, 2012 Dean Michael Berris, Jeroen Habraken, Glyn Matthews, Fredrik Olofsson.
3+
=======
4+
// Copyright 2009, 2010, 2011 Dean Michael Berris, Jeroen Habraken, Glyn Matthews, Fredrik Olofsson.
5+
>>>>>>> 0c90ce044e6de485f66dd657a6d4ff9bba18279d
26
// Distributed under the Boost Software License, Version 1.0.
37
// (See accompanying file LICENSE_1_0.txt of copy at
48
// http://www.boost.org/LICENSE_1_0.txt)
@@ -7,6 +11,7 @@
711
#include <boost/config/warning_disable.hpp>
812
#include <boost/test/unit_test.hpp>
913
#include <boost/network/uri.hpp>
14+
#include <boost/network/uri/utility.hpp>
1015
#include <boost/network/uri/uri.hpp>
1116
#include <boost/network/uri/uri_io.hpp>
1217
#include <boost/network/uri/normalize.hpp>
@@ -465,6 +470,7 @@ BOOST_AUTO_TEST_CASE(issue_104_test) {
465470
BOOST_CHECK_EQUAL(uri::scheme(copy), "http");
466471
}
467472

473+
<<<<<<< HEAD
468474
BOOST_AUTO_TEST_CASE(normalize_empty_string) {
469475
BOOST_CHECK_EQUAL(uri::normalize(""), "/");
470476
}
@@ -476,4 +482,15 @@ BOOST_AUTO_TEST_CASE(normalize_relative_string) {
476482
}
477483
BOOST_AUTO_TEST_CASE(normalize_slashend_string) {
478484
BOOST_CHECK_EQUAL(uri::normalize("/test/"), "/test");
485+
=======
486+
BOOST_AUTO_TEST_CASE(normalize_string) {
487+
BOOST_CHECK_EQUAL(uri::normalize(""), "/");
488+
BOOST_CHECK_EQUAL(uri::normalize("/"), "/");
489+
BOOST_CHECK_EQUAL(uri::normalize("/../"), "/");
490+
BOOST_CHECK_EQUAL(uri::normalize("/test/../../../"), "/");
491+
BOOST_CHECK_EQUAL(uri::normalize("../../test"), "/test");
492+
BOOST_CHECK_EQUAL(uri::normalize("/test/"), "/test");
493+
BOOST_CHECK_EQUAL(uri::normalize("/test/test/../"), "/test");
494+
BOOST_CHECK_EQUAL(uri::normalize("/../?test=test&param2=../p"), "/?test=test&param2=../p");
495+
>>>>>>> 0c90ce044e6de485f66dd657a6d4ff9bba18279d
479496
}

0 commit comments

Comments
 (0)