mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
fixed #468: HTTPClientSession/HTTPResponse not forwarding exceptions
This commit is contained in:
@@ -208,6 +208,7 @@ void HTTPResponse::read(std::istream& istr)
|
||||
std::string reason;
|
||||
|
||||
int ch = istr.get();
|
||||
if (istr.bad()) throw NetException("Error reading HTTP response header");
|
||||
if (ch == eof) throw NoMessageException();
|
||||
while (Poco::Ascii::isSpace(ch)) ch = istr.get();
|
||||
if (ch == eof) throw MessageException("No HTTP response header");
|
||||
|
||||
Reference in New Issue
Block a user