big perf improvement on HEAD

This commit is contained in:
Adam D. Ruppe 2020-12-06 13:33:47 -05:00
parent da1f22af2c
commit 8b042a4b0f
1 changed files with 4 additions and 1 deletions

View File

@ -1340,6 +1340,9 @@ class HttpRequest {
// done with headers
if(data[position] == '\r' && (position + 1) < data.length && data[position + 1] == '\n')
position++;
if(this.requestParameters.method == HttpVerb.HEAD)
state = State.complete;
else
state = State.readingBody;
position++; // skip the newline
break;