Fix: Http: Body size limit not properly initialized

This commit is contained in:
Vojtech Kral 2018-06-27 10:34:21 +02:00 committed by bubnikv
parent 6706c3b71f
commit 930a2f1d12
2 changed files with 3 additions and 1 deletions

View File

@ -71,6 +71,7 @@ Http::priv::priv(const std::string &url) :
form(nullptr),
form_end(nullptr),
headerlist(nullptr),
limit(0),
cancel(false)
{
if (curl == nullptr) {

View File

@ -46,7 +46,8 @@ public:
Http& operator=(const Http &) = delete;
Http& operator=(Http &&) = delete;
// Sets a maximum size of the data that can be received. The default is 5MB.
// Sets a maximum size of the data that can be received.
// A value of zero sets the default limit, which is is 5MB.
Http& size_limit(size_t sizeLimit);
// Sets a HTTP header field.
Http& header(std::string name, const std::string &value);