mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-05 04:58:05 +00:00
integrated changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HTTPRequest.cpp
|
||||
//
|
||||
// $Id: //poco/1.3/Net/src/HTTPRequest.cpp#1 $
|
||||
// $Id: //poco/1.3/Net/src/HTTPRequest.cpp#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
@@ -211,10 +211,10 @@ void HTTPRequest::read(std::istream& istr)
|
||||
while (isspace(ch)) ch = istr.get();
|
||||
if (ch == eof) throw MessageException("No HTTP request header");
|
||||
while (!isspace(ch) && ch != eof && method.length() < MAX_METHOD_LENGTH) { method += (char) ch; ch = istr.get(); }
|
||||
if (!isspace(ch)) throw MessageException("HTTP request method too long");
|
||||
if (!isspace(ch)) throw MessageException("HTTP request method invalid or too long");
|
||||
while (isspace(ch)) ch = istr.get();
|
||||
while (!isspace(ch) && ch != eof && uri.length() < MAX_URI_LENGTH) { uri += (char) ch; ch = istr.get(); }
|
||||
if (!isspace(ch)) throw MessageException("HTTP request URI too long");
|
||||
if (!isspace(ch)) throw MessageException("HTTP request URI invalid or too long");
|
||||
while (isspace(ch)) ch = istr.get();
|
||||
while (!isspace(ch) && ch != eof && version.length() < MAX_VERSION_LENGTH) { version += (char) ch; ch = istr.get(); }
|
||||
if (!isspace(ch)) throw MessageException("Invalid HTTP version string");
|
||||
|
||||
Reference in New Issue
Block a user