Skip to content

Commit

Permalink
Prevent the logic that looks for the /n from getting confused by line…
Browse files Browse the repository at this point in the history
…s containing zeroes
  • Loading branch information
Fabrizio Furano committed Jan 9, 2020
1 parent effc233 commit e6db780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -674,7 +674,7 @@ int XrdHttpProtocol::Process(XrdLink *lp) // We ignore the argument here
while ((rc = BuffgetLine(tmpline)) > 0) {
TRACE(DEBUG, " rc:" << rc << " got hdr line: " << tmpline);

if ((rc == 2) && (tmpline[rc - 1] == '\n')) {
if ((rc == 2) && (tmpline.length() > 1) && (tmpline[rc - 1] == '\n')) {
CurrentReq.headerok = true;
TRACE(DEBUG, " rc:" << rc << " detected header end.");
break;
Expand Down

0 comments on commit e6db780

Please sign in to comment.