Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
[#128] fix other problems related #128
Browse files Browse the repository at this point in the history
  • Loading branch information
yongk.kim committed Nov 21, 2019
1 parent f78d0a8 commit 566fe47
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,8 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)

res = 0;

do {
for (; i < len - 1; i++, ch = data[i]) {

log_debug("[%p] s_check_uri", p);

if (usual[ch >> 5] & (1 << (ch & 0x1f))) {
Expand All @@ -1239,12 +1240,7 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
break;
}

if (evhtp_unlikely(i + 1 >= len)) {
break;
}

ch = data[++i];
} while (i < len);
}

switch (ch) {
case ' ':
Expand Down Expand Up @@ -1316,19 +1312,13 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)

res = 0;

do {
for (; i < len - 1; i++, ch = data[i]) {
if (usual[ch >> 5] & (1 << (ch & 0x1f))) {
HTP_SET_BUF(ch);
} else {
break;
}

if (evhtp_unlikely(i + 1 >= len)) {
break;
}

ch = data[++i];
} while (i < len);
}

switch (ch) {
case ' ':
Expand Down

0 comments on commit 566fe47

Please sign in to comment.