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

Commit83f17fd

Browse files
committed
Lesson: Be Careful with Print Debugging
So it's been all good all along -- apparently in my eagerness to doprint debugging, actually getting the information from the stream_bufactually causes the characters to be consumed. Removing the printing ofthe linearized command_stream alleviates the hanging issue -- now I canconcentrate on other more pressing matters with the SSL implementationand the other missing functionality with the response type.
1 parent2f2890f commit83f17fd

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
5555
// TODO: Implement a different connection type and factory for HTTP/1.0.
5656
linearize(request, method,1,1,
5757
std::ostreambuf_iterator<char>(&command_streambuf));
58-
#ifdef BOOST_NETWORK_DEBUG
59-
{
60-
std::ostringstream linearized;
61-
linearized << &command_streambuf;
62-
BOOST_NETWORK_MESSAGE("linearized request: ['" << linearized.str() <<"']");
63-
}
64-
#endif
6558
this->method = method;
6659
BOOST_NETWORK_MESSAGE("method:" <<this->method);
6760
boost::uint16_t port_ =port(request);

‎boost/network/protocol/http/client/connection/normal_delegate.ipp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ void boost::network::http::normal_delegate::connect(
2929
voidboost::network::http::normal_delegate::write(
3030
asio::streambuf & command_streambuf,
3131
function<void(system::error_codeconst &,size_t)> handler) {
32+
BOOST_NETWORK_MESSAGE("normal_delegate::write(...)");
33+
BOOST_NETWORK_MESSAGE("scheduling asynchronous write...");
3234
asio::async_write(*socket_, command_streambuf, handler);
3335
}
3436

@@ -38,6 +40,7 @@ void boost::network::http::normal_delegate::read_some(
3840
BOOST_NETWORK_MESSAGE("normal_delegate::read_some(...)");
3941
BOOST_NETWORK_MESSAGE("scheduling asynchronous read some...");
4042
socket_->async_read_some(read_buffer, handler);
43+
BOOST_NETWORK_MESSAGE("scheduled asynchronous read some...");
4144
}
4245

4346
boost::network::http::normal_delegate::~normal_delegate() {}

‎boost/network/protocol/http/response/response.ipp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ struct response_pimpl {
8181
}
8282
}
8383
}else {
84-
it = headers_future_.get().begin();
85-
for (;it != headers_future_.get().end(); ++it) {
84+
std::multimap<std::string, std::string>const & headers_ =
85+
headers_future_.get();
86+
it = headers_.begin();
87+
for (;it != headers_.end(); ++it) {
8688
if (removed_headers_.find(it->first) == removed_headers_.end()) {
8789
inserter(it->first, it->second);
8890
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp