Skip to content

Commit ac5e383

Browse files
authored
Merge pull request #2 from Icaro-Lima/master
Swap 'sizeof' by 'strlen' in the request and response examples
2 parents 8e7a813 + b5ce49d commit ac5e383

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Examples
2525
Request request;
2626
HttpRequestParser parser;
2727

28-
HttpRequestParser::ParseResult res = parser.parse(request, text, text + sizeof(text));
28+
HttpRequestParser::ParseResult res = parser.parse(request, text, text + strlen(text));
2929

3030
if( res == HttpRequestParser::ParsingCompleted )
3131
{
@@ -61,7 +61,7 @@ Examples
6161
Response response;
6262
HttpResponseParser parser;
6363

64-
HttpResponseParser::ParseResult res = parser.parse(response, text, text + sizeof(text));
64+
HttpResponseParser::ParseResult res = parser.parse(response, text, text + strlen(text));
6565

6666
if( res == HttpResponseParser::ParsingCompleted )
6767
{

0 commit comments

Comments
 (0)