Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite182a57

Browse files
committed
Fixing bug with HTTP/1.1 accept encoding header.
1 parent28e523f commite182a57

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

‎boost/network/protocol/http/algorithms/linearize.hpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ namespace boost { namespace network { namespace http {
101101
*oi =consts::colon_char();
102102
*oi =consts::space_char();
103103
boost::copy(default_accept_encoding, oi);
104+
boost::copy(crlf, oi);
104105
}
105106
typedeftypename headers_range<basic_request<Tag> >::type headers_range;
106107
typedeftypename range_iterator<headers_range>::type headers_iterator;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
// Copyright 2010 Dean Michael Berris.
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// (See accompanying file LICENSE_1_0.txt or copy at
5+
// http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#defineBOOST_TEST_MODULE HTTP Request Linearize Test
8+
#include<boost/network/protocol/http/request.hpp>
9+
#include<boost/network/protocol/http/algorithms/linearize.hpp>
10+
#include<boost/test/unit_test.hpp>
11+
#include<boost/mpl/list.hpp>
12+
#include<iostream>
13+
14+
namespacehttp= boost::network::http;
15+
namespacetags= boost::network::http::tags;
16+
namespacempl= boost::mpl;
17+
namespacenet= boost::network;
18+
19+
typedef mpl::list<
20+
tags::http_default_8bit_tcp_resolve
21+
, tags::http_default_8bit_udp_resolve
22+
, tags::http_async_8bit_tcp_resolve
23+
, tags::http_async_8bit_udp_resolve
24+
> tag_types;
25+
26+
BOOST_AUTO_TEST_CASE_TEMPLATE(linearize_request, T, tag_types) {
27+
http::basic_request<T>request("http://www.boost.org");
28+
linearize(request,"GET",1,0, std::ostream_iterator<typename net::char_<T>::type>(std::cout));
29+
linearize(request,"GET",1,1, std::ostream_iterator<typename net::char_<T>::type>(std::cout));
30+
}
31+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp