mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
*Web: HttpClient fixed max_content_size issue
git-svn-id: svn://ultimatepp.org/upp/trunk@2999 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6e7ebec266
commit
5beab710a3
1 changed files with 2 additions and 2 deletions
|
|
@ -379,7 +379,7 @@ String HttpClient::Execute(Gate2<int, int> progress)
|
|||
for(p += CL_LENGTH; *p == ' '; p++)
|
||||
;
|
||||
if(IsDigit(*p)) {
|
||||
content_length = minmax<int>(stou(p), 0, max_content_size);
|
||||
content_length = stou(p);
|
||||
if(content_length > max_content_size) {
|
||||
error = NFormat(t_("%s:%d: maximum data length exceeded (%d B)"), host, port, max_content_size);
|
||||
return String::GetVoid();
|
||||
|
|
@ -432,7 +432,7 @@ String HttpClient::Execute(Gate2<int, int> progress)
|
|||
}
|
||||
String part = socket.Read(1000);
|
||||
if(!part.IsEmpty()) {
|
||||
if(body.GetLength() + part.GetLength() > DEFAULT_MAX_CONTENT_SIZE) {
|
||||
if(body.GetLength() + part.GetLength() > max_content_size) {
|
||||
error = NFormat(t_("Maximum content size exceeded: %d"), body.GetLength() + part.GetLength());
|
||||
goto EXIT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue