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

Commitdaafa48

Browse files
umenneldeanberris
authored andcommitted
Nicer formatting and clean ups
1 parent83ed388 commitdaafa48

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include<iterator>
1313
#include<cstdint>
14-
#include<iostream>
1514
#include<boost/algorithm/string/trim.hpp>
1615
#include<boost/asio/steady_timer.hpp>
1716
#include<boost/asio/placeholders.hpp>
@@ -48,10 +47,10 @@ struct chunk_encoding_parser {
4847
size_t chunk_size;
4948
std::array<typename char_<Tag>::type,1024> buffer;
5049

51-
voidupdate_chunk_size(boost::iterator_range<typename std::array<
52-
typename char_<Tag>::type,1024>::const_iterator>const &range) {
53-
if (range.empty())
54-
return;
50+
voidupdate_chunk_size(
51+
boost::iterator_range<typename std::array<
52+
typename char_<Tag>::type,1024>::const_iterator>const &range) {
53+
if (range.empty())return;
5554
std::stringstream ss;
5655
ss << std::hex << range;
5756
size_t size;
@@ -61,15 +60,15 @@ struct chunk_encoding_parser {
6160
}
6261

6362
boost::iterator_range<
64-
typename std::array<typename char_<Tag>::type,1024>::const_iterator>
65-
operator()(boost::iterator_range<typename std::array<
66-
typename char_<Tag>::type,1024>::const_iterator>const &range) {
63+
typename std::array<typename char_<Tag>::type,1024>::const_iterator>
64+
operator()(
65+
boost::iterator_range<typename std::array<
66+
typename char_<Tag>::type,1024>::const_iterator>const &range) {
6767
auto iter =boost::begin(range);
6868
auto begin = iter;
6969
auto pos =boost::begin(buffer);
7070

71-
while (iter !=boost::end(range))
72-
switch (state) {
71+
while (iter !=boost::end(range))switch (state) {
7372
casestate_t::header:
7473
iter =std::find(iter,boost::end(range),'\r');
7574
update_chunk_size(boost::make_iterator_range(begin, iter));
@@ -485,19 +484,22 @@ struct http_async_connection
485484
string_type body_string;
486485
if (this->is_chunk_encoding && remove_chunk_markers_) {
487486
for (size_t i =0; i <this->partial_parsed.size(); i +=1024) {
488-
auto range =parse_chunk_encoding(
489-
boost::make_iterator_range(this->partial_parsed.data() + i,
490-
this->partial_parsed.data() +std::min(i+1024,this->partial_parsed.size())));
487+
auto range =parse_chunk_encoding(boost::make_iterator_range(
488+
this->partial_parsed.data() + i,
489+
this->partial_parsed.data() +
490+
std::min(i +1024,this->partial_parsed.size())));
491491
body_string.append(boost::begin(range),boost::end(range));
492492
}
493493
this->partial_parsed.clear();
494-
auto range =parse_chunk_encoding(boost::make_iterator_range(this->part.begin(),
495-
this->part.begin() + bytes_transferred));
494+
auto range =parse_chunk_encoding(boost::make_iterator_range(
495+
this->part.begin(),
496+
this->part.begin() + bytes_transferred));
496497
body_string.append(boost::begin(range),boost::end(range));
497498
this->body_promise.set_value(body_string);
498499
}else {
499500
std::swap(body_string,this->partial_parsed);
500-
body_string.append(this->part.begin(),this->part.begin() + bytes_transferred);
501+
body_string.append(this->part.begin(),
502+
this->part.begin() + bytes_transferred);
501503
this->body_promise.set_value(body_string);
502504
}
503505
}

‎boost/network/protocol/http/policies/async_connection.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ struct async_connection_policy : resolver_policy<Tag>::type {
4949
optional<string_type>const& sni_hostname,long ssl_options) {
5050
pimpl = impl::async_connection_base<Tag, version_major, version_minor>::
5151
new_connection(resolve, resolver, follow_redirect, always_verify_peer,
52-
https, timeout, remove_chunk_markers, certificate_filename,
53-
verify_path, certificate_file, private_key_file, ciphers,
54-
sni_hostname, ssl_options);
52+
https, timeout, remove_chunk_markers,
53+
certificate_filename, verify_path, certificate_file,
54+
private_key_file, ciphers,sni_hostname, ssl_options);
5555
}
5656

5757
basic_response<Tag>send_request(string_type/*unused*/const& method,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp