feat: OrcaCloud pane crash, per-open re-sign-in, and web-session persistence

This commit is contained in:
Ian Chua
2026-10-13 17:33:16 +08:00
parent e2911ac6e6
commit 950f1631e9
9 changed files with 534 additions and 100 deletions
+8
View File
@@ -482,6 +482,14 @@ void Http::priv::http_perform()
if (!postfields.empty()) {
::curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postfields.c_str());
::curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, postfields.size());
} else if (method == "POST" && form == nullptr && mime == nullptr) {
// A POST with no body. Without CURLOPT_POSTFIELDS, curl takes the request body from
// the read callback, but form_file_read_cb only has a usable user pointer for a PUT
// (set_put_body) or a streamed multipart part (form_add_file); for an empty POST it
// dereferences libcurl's default READDATA as a form_file and crashes. Point curl at a
// zero-length body so the read callback is never used.
::curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postfields.c_str());
::curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, static_cast<curl_off_t>(0));
}
CURLcode res = ::curl_easy_perform(curl);