mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-13 07:23:03 +00:00
Support file uploads and the device details page for Elegoo Centauri Carbon 2 (#13212)
* Support file uploads and the device details page for CC2 printers. * Resolved build issues for Linux and macOS. * 1. Added `ElegooPrinterWebViewHandler` to handle WebUI messages for Elegoo printers. Other printers will keep the current behavior. 2. Added a static `get_print_host_webui` method in `PrintHost` to retrieve the printer WebUI URL. * Improved timeout handling for CC2 file upload and SN info APIs. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -570,6 +570,21 @@ Http& Http::header(std::string name, const std::string &value)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Http& Http::headers_reset()
|
||||
{
|
||||
if (!p) { return *this; }
|
||||
|
||||
::curl_slist_free_all(p->headerlist);
|
||||
p->headerlist = nullptr;
|
||||
p->headerlist = curl_slist_append(p->headerlist, "Expect:");
|
||||
|
||||
std::lock_guard<std::mutex> l(g_mutex);
|
||||
for (auto it = extra_headers.begin(); it != extra_headers.end(); ++it)
|
||||
this->header(it->first, it->second);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Http& Http::remove_header(std::string name)
|
||||
{
|
||||
if (p) {
|
||||
|
||||
Reference in New Issue
Block a user