11
2- // Copyright Dean Michael Berris 2009.
2+ // Copyright Dean Michael Berris 2009.
33// Distributed under the Boost Software License, Version 1.0.
44// (See accompanying file LICENSE_1_0.txt or copy at
5- // http://www.boost.org/LICENSE_1_0.txt)
5+ // http://www.boost.org/LICENSE_1_0.txt)
66
77#define BOOST_TEST_MODULE http1.1 test
88#include < boost/config/warning_disable.hpp>
@@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test, T, tag_types) {
2121 http::basic_response<T> response_;
2222 response_ = client_.get (request);
2323typename headers_range<typename http::basic_response<T> >::type range =headers (response_)[" Content-Type" ];
24- BOOST_CHECK (begin (range) !=end (range) );
24+ BOOST_CHECK (begin (range) !=end (range) );
2525BOOST_CHECK (body (response_).size () !=0 );
2626}
2727
@@ -43,31 +43,31 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test_timeout, T, tag_types) {
4343}
4444
4545BOOST_AUTO_TEST_CASE_TEMPLATE (http_get_details, T, tag_types) {
46- http::basic_request<T>request (" http://www.boost.org/" );
47- http::basic_client<T,1 ,1 > client_;
48- http::basic_response<T> response_;
49- BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
50- BOOST_CHECK_EQUAL ( response_.version ().substr (0 ,7 ),std::string (" HTTP/1." ) );
51- BOOST_CHECK_EQUAL ( response_.status (),200u );
52- BOOST_CHECK_EQUAL ( response_.status_message (),std::string (" OK" ) );
46+ http::basic_request<T>request (" http://www.boost.org/" );
47+ http::basic_client<T,1 ,1 > client_;
48+ http::basic_response<T> response_;
49+ BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
50+ BOOST_CHECK_EQUAL ( response_.version ().substr (0 ,7 ),std::string (" HTTP/1." ) );
51+ BOOST_CHECK_EQUAL ( response_.status (),200u );
52+ BOOST_CHECK_EQUAL ( response_.status_message (),std::string (" OK" ) );
5353}
5454
5555BOOST_AUTO_TEST_CASE_TEMPLATE (http_cached_resolve, T, tag_types) {
56- http::basic_request<T>request (" http://www.boost.org" );
57- http::basic_request<T>other_request (" http://www.boost.org/users/license.html" );
58- http::basic_client<T,1 ,1 >client_ (http::basic_client<T,1 ,1 >::cache_resolved);
59- http::basic_response<T> response_;
60- BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
61- // BOOST_CHECK_NO_THROW ( response_ = client_.get(other_request) );
62- response_ = client_.get (other_request);
56+ http::basic_request<T>request (" http://www.boost.org" );
57+ http::basic_request<T>other_request (" http://www.boost.org/users/license.html" );
58+ http::basic_client<T,1 ,1 >client_ (http::basic_client<T,1 ,1 >::cache_resolved);
59+ http::basic_response<T> response_;
60+ BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
61+ BOOST_CHECK_NO_THROW ( response_ = client_.get (other_request) );
62+ response_ = client_.get (other_request);
6363}
6464
6565BOOST_AUTO_TEST_CASE_TEMPLATE (http_redirection_test, T, tag_types) {
66- http::basic_request<T>request (" http://boost.org" );
67- http::basic_client<T,1 ,1 >client_ (http::basic_client<T,1 ,1 >::follow_redirect);
68- http::basic_response<T> response_;
69- BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
70- BOOST_CHECK_EQUAL ( response_.status (),200u );
66+ http::basic_request<T>request (" http://boost.org" );
67+ http::basic_client<T,1 ,1 >client_ (http::basic_client<T,1 ,1 >::follow_redirect);
68+ http::basic_response<T> response_;
69+ BOOST_CHECK_NO_THROW ( response_ = client_.get (request) );
70+ BOOST_CHECK_EQUAL ( response_.status (),200u );
7171}
7272
7373