Skip to content

Commit

Permalink
Merge pull request #1108 from ffurano/fix-cr-lf
Browse files Browse the repository at this point in the history
Prevent the logic that looks for the /n from getting confused by line…
  • Loading branch information
ffurano committed Jan 9, 2020
2 parents fc9f9f2 + e6db780 commit 347524c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -678,7 +678,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 347524c

Please sign in to comment.