Skip to content

Commit d727939

Browse files
committed
Add a function to check whether the content of a request was too large.
1 parent 2bdbda9 commit d727939

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/httpserver/http_request.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,18 @@ class http_request
310310
{
311311
result = this->content;
312312
}
313+
/**
314+
* Method to check whether the size of the content reached or exceeded content_size_limit.
315+
* @return boolean
316+
**/
317+
bool content_too_large() const
318+
{
319+
return content.size()>=content_size_limit;
320+
}
321+
/**
322+
* Method used to get the content of the query string..
323+
* @return the query string in string representation
324+
**/
313325
const std::string get_querystring() const
314326
{
315327
return this->querystring;

0 commit comments

Comments
 (0)