mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
SF#3500438: HTTPResponse failure when reason is empty
This commit is contained in:
@@ -236,7 +236,7 @@ void HTTPResponse::read(std::istream& istr)
|
||||
while (Poco::Ascii::isSpace(ch)) ch = istr.get();
|
||||
while (!Poco::Ascii::isSpace(ch) && ch != eof && status.length() < MAX_STATUS_LENGTH) { status += (char) ch; ch = istr.get(); }
|
||||
if (!Poco::Ascii::isSpace(ch)) throw MessageException("Invalid HTTP status code");
|
||||
while (Poco::Ascii::isSpace(ch)) ch = istr.get();
|
||||
while (Poco::Ascii::isSpace(ch) && ch != '\r' && ch != '\n' && ch != eof) ch = istr.get();
|
||||
while (ch != '\r' && ch != '\n' && ch != eof && reason.length() < MAX_REASON_LENGTH) { reason += (char) ch; ch = istr.get(); }
|
||||
if (!Poco::Ascii::isSpace(ch)) throw MessageException("HTTP reason string too long");
|
||||
if (ch == '\r') ch = istr.get();
|
||||
|
||||
Reference in New Issue
Block a user