Skip to content

Commit

Permalink
headers parsing tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed Aug 15, 2018
1 parent 6199ae5 commit c5455dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/HTTPRequestParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ class HTTPRequestParser
++index;
}

while((index<sz)&&((buff[index] == ' ')||(buff[index] == ':'))) ++index;
while((index<sz)&&((buff[index] == ' ')||(buff[index] == ':')||(buff[index] == '\t'))) ++index;

while((index<sz)&&(buff[index] != '\r')&&(buff[index] != '\n'))
{
value.append(1,buff[index]);
++index;
}

while((index<sz)&&((buff[index] == ' ')||(buff[index] == '\r')||(buff[index] == '\n')||(buff[index] == ':'))) ++index;
while((index<sz)&&((buff[index] == ' ')||(buff[index] == '\r')||(buff[index] == '\n'))) ++index;

mHeaders.emplace(std::move(key),std::move(value));
}
Expand Down

0 comments on commit c5455dd

Please # to comment.