lordgamez commented on a change in pull request #921:
URL: https://github.com/apache/nifi-minifi-cpp/pull/921#discussion_r504053097
##########
File path: extensions/civetweb/processors/ListenHTTP.cpp
##########
@@ -456,19 +473,28 @@ int64_t
ListenHTTP::WriteCallback::process(std::shared_ptr<io::BaseStream> strea
}
// Read a buffer of data from client
- rlen = mg_read(conn_, &buf[0], (size_t) rlen);
+ rlen = mg_read(conn, &buf[0], (size_t) rlen);
if (rlen <= 0) {
break;
}
// Transfer buffer data to the output stream
- stream->write(&buf[0], gsl::narrow<int>(rlen));
+ content_buffer->write(&buf[0], gsl::narrow<int>(rlen));
nlen += rlen;
}
- return nlen;
+ return content_buffer;
+}
+
+ListenHTTP::WriteCallback::WriteCallback(std::unique_ptr<io::BufferStream>
request_content)
+ : logger_(logging::LoggerFactory<ListenHTTP::WriteCallback>::getLogger())
+ , request_content_(std::move(request_content)) {
+}
+
+int64_t ListenHTTP::WriteCallback::process(std::shared_ptr<io::BaseStream>
stream) {
Review comment:
As I checked it was an overriden virtual method so the parameter type is
fixed, but I added the `override` keyword to be more explicit in
[0427909](https://github.com/apache/nifi-minifi-cpp/pull/921/commits/0427909155e707881d8640ca20e1c33b0c9d84f5)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]