1
1
2
- // Copyright Dean Michael Berris 2009.
2
+ // Copyright Dean Michael Berris 2009.
3
3
// Distributed under the Boost Software License, Version 1.0.
4
4
// (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)
6
6
7
7
#define BOOST_TEST_MODULE http1.1 test
8
8
#include < boost/config/warning_disable.hpp>
@@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test, T, tag_types) {
21
21
http::basic_response<T> response_;
22
22
response_ = client_.get (request);
23
23
typename 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) );
25
25
BOOST_CHECK (body (response_).size () !=0 );
26
26
}
27
27
@@ -43,31 +43,31 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test_timeout, T, tag_types) {
43
43
}
44
44
45
45
BOOST_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" ) );
53
53
}
54
54
55
55
BOOST_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);
63
63
}
64
64
65
65
BOOST_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 );
71
71
}
72
72
73
73