File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
boost/network/protocol/http/client/connection Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ struct sync_connection_base_impl {
84
84
string_type header_line, name;
85
85
while (std::getline (response_stream, header_line) && header_line != " \r " ) {
86
86
trim_right_if (header_line, boost::is_space () || boost::is_any_of (" \r " ));
87
- typename string_type::size_type colon_offset;
87
+ typename string_type::size_type colon_offset, value_offset ;
88
88
if (header_line.size () && header_line[0 ] == ' ' ) {
89
89
assert (!name.empty ());
90
90
if (name.empty ())
@@ -94,7 +94,8 @@ struct sync_connection_base_impl {
94
94
} else if ((colon_offset = header_line.find_first_of (' :' )) !=
95
95
string_type::npos) {
96
96
name = header_line.substr (0 , colon_offset);
97
- response_ << header (name, header_line.substr (colon_offset + 2 ));
97
+ value_offset = header_line.find_first_not_of (' ' , colon_offset + 1 );
98
+ response_ << header (name, header_line.substr (value_offset, header_line.size () - value_offset));
98
99
}
99
100
}
100
101
}
You can’t perform that action at this time.
0 commit comments