diff --git a/src/http_response.cpp b/src/http_response.cpp index 75d1082b..0d111255 100644 --- a/src/http_response.cpp +++ b/src/http_response.cpp @@ -207,7 +207,7 @@ namespace details ssize_t cb(void* cls, uint64_t pos, char* buf, size_t max) { - ssize_t val = static_cast(cls)->cycle_callback(buf); + ssize_t val = static_cast(cls)->cycle_callback(buf, max); if(val == -1) static_cast(cls)->completed = true; return val; diff --git a/src/httpserver/http_response.hpp b/src/httpserver/http_response.hpp index d7b57df3..942bf1c8 100644 --- a/src/httpserver/http_response.hpp +++ b/src/httpserver/http_response.hpp @@ -62,7 +62,7 @@ class bad_caching_attempt: public std::exception } }; -typedef ssize_t(*cycle_callback_ptr)(const std::string&); +typedef ssize_t(*cycle_callback_ptr)(char*, size_t); /** * Class representing an abstraction for an Http Response. It is used from classes using these apis to send information through http protocol.