Skip to content

Commit

Permalink
Do not increment reqstate when headers are incomplete.
Browse files Browse the repository at this point in the history
If the server got incomplete headers (I was able to reliably trigger
this with connection reuse), the reqstate variable was still incremented.

This resulted in the request state becoming inconsistent - notably,
HEAD requests believed they always included a checksum.  There are
likely other strange XrdHttp behaviors that could have been triggered
due to the same bug.

(cherry picked from commit 88dad6a)
  • Loading branch information
bbockelm committed Sep 13, 2018
1 parent cbb924b commit 0037189
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -750,6 +750,7 @@ int XrdHttpProtocol::Process(XrdLink *lp) // We ignore the argument here

if (!CurrentReq.headerok) {
TRACEI(REQ, " rc:" << rc << "Header not yet complete.");
CurrentReq.reqstate--;
// Waiting for more data
return 1;
}
Expand Down

0 comments on commit 0037189

Please sign in to comment.