fix: use sslWriteAll
This commit is contained in:
@@ -530,8 +530,9 @@ void TinyMITMProxy::handleClient(SOCKET clientSocket)
|
|||||||
headers.insert(headers.size() - 2,
|
headers.insert(headers.size() - 2,
|
||||||
"Content-Length: " + std::to_string(fullBody.size()) + "\r\n");
|
"Content-Length: " + std::to_string(fullBody.size()) + "\r\n");
|
||||||
|
|
||||||
if (wolfSSL_write(remoteSSL.get(), headers.data(), (int)headers.size()) <= 0) break;
|
std::string packet = headers + fullBody;
|
||||||
if (wolfSSL_write(remoteSSL.get(), fullBody.data(), (int)fullBody.size()) <= 0) break;
|
if (!sslWriteAll(remoteSSL.get(), packet.data(), (int)packet.size(), remoteGuard))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
clientStream.buffer.erase(0, totalRequestSize);
|
clientStream.buffer.erase(0, totalRequestSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user