Fix http headers bug when using proxy server
This commit is contained in:
parent
d423ac93e0
commit
4d456c56a8
@ -207,11 +207,16 @@ namespace details {
|
||||
inline void headers(std::string_view data, Headers & headers) {
|
||||
memory::Monotonic_4k_Resource stackResource;
|
||||
std::pmr::string tmp{&stackResource};
|
||||
tmp.reserve(300);
|
||||
|
||||
std::istringstream resp{};
|
||||
resp.rdbuf()->pubsetbuf(const_cast< char * >(data.data()), data.size());
|
||||
|
||||
while(std::getline(resp, tmp) && !(trim(tmp).empty())) {
|
||||
while(std::getline(resp, tmp)) {
|
||||
if(tmp == "\r")
|
||||
continue;
|
||||
if(trim(tmp).empty())
|
||||
break;
|
||||
auto line = std::string_view(tmp);
|
||||
auto index = tmp.find(':', 0);
|
||||
if(index != std::string::npos) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user