Parse Content-Range with missing right hand side

Fixes #144
This commit is contained in:
Justine Tunney 2021-04-01 18:51:12 -07:00
parent 7abca1531f
commit 83abd68029
6 changed files with 59 additions and 26 deletions

View file

@ -87,6 +87,8 @@ int ParseHttpRequest(struct HttpRequest *r, const char *p, size_t n) {
return ebadmsg();
}
break;
} else if (!('A' <= c && c <= 'Z')) {
return ebadmsg();
}
if (++r->i == n) break;
c = p[r->i] & 0xff;