Skip to content

Commit

Permalink
Accept request for 0 streams.
Browse files Browse the repository at this point in the history
This is interpretted as just needing one.
  • Loading branch information
bbockelm committed Jun 14, 2018
1 parent cc0b653 commit b8f3fc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/XrdTpc/XrdTpcTPC.cc
Expand Up @@ -468,11 +468,12 @@ int TPCHandler::ProcessPullReq(const std::string &resource, XrdHttpExtReq &req)
stream_req = std::stol(streams_header->second);
} catch (...) { // Handled below
}
if (stream_req < 1 || stream_req > 100) {
if (stream_req < 0 || stream_req > 100) {
char msg[] = "Invalid request for number of streams";
m_log.Emsg("ProcessPullReq", msg);
return req.SendSimpleResp(500, NULL, NULL, msg, 0);
}
streams = stream_req;
streams = streams == 0 ? 1 : stream_req;
}
}

Expand Down

0 comments on commit b8f3fc7

Please sign in to comment.