PIHTTPServer basic auth works
This commit is contained in:
@@ -102,8 +102,8 @@ void PIHTTPClient::procHeaderLine(PIString & line) {
|
||||
|
||||
size_t PIHTTPClient::writeMemoryFunc(void * contents, size_t size, size_t nmemb, void * ptr) {
|
||||
size_t bytes = size * nmemb;
|
||||
piCout << "writeMemoryFunc" << bytes;
|
||||
auto client = reinterpret_cast<PIHTTPClient *>(ptr);
|
||||
// piCout << "writeMemoryFunc" << bytes;
|
||||
auto client = reinterpret_cast<PIHTTPClient *>(ptr);
|
||||
if (client->is_cancel) return CURL_WRITEFUNC_ERROR;
|
||||
client->buffer_out.append(contents, bytes);
|
||||
return bytes;
|
||||
@@ -112,8 +112,8 @@ size_t PIHTTPClient::writeMemoryFunc(void * contents, size_t size, size_t nmemb,
|
||||
|
||||
size_t PIHTTPClient::readMemoryFunc(void * contents, size_t size, size_t nmemb, void * ptr) {
|
||||
size_t bytes = size * nmemb;
|
||||
piCout << "readMemoryFunc" << bytes;
|
||||
auto client = reinterpret_cast<PIHTTPClient *>(ptr);
|
||||
// piCout << "readMemoryFunc" << bytes;
|
||||
auto client = reinterpret_cast<PIHTTPClient *>(ptr);
|
||||
if (client->is_cancel) return CURL_READFUNC_ABORT;
|
||||
const auto & buffer(client->request.body());
|
||||
if (buffer.isEmpty()) return 0;
|
||||
|
||||
Reference in New Issue
Block a user