mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 02:37:04 +00:00
ElegooLink: fix host extraction for IP address parsing
get_host_from_url() returns host:port which may cause boost::asio::ip::make_address() to fail when a port is present, bypassing the direct IP upload path and falling through to DNS resolution via upload_inner_with_host(). Use get_host_from_url_no_port() to extract just the host. Signed-off-by: Igor Mammedov <niallain@gmail.com>
This commit is contained in:
@@ -1016,7 +1016,7 @@ namespace Slic3r {
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
return upload_inner_with_host(std::move(upload_data), prorgess_fn, error_fn, info_fn);
|
return upload_inner_with_host(std::move(upload_data), prorgess_fn, error_fn, info_fn);
|
||||||
#else
|
#else
|
||||||
std::string host = get_host_from_url(m_host);
|
std::string host = get_host_from_url_no_port(m_host);
|
||||||
|
|
||||||
// decide what to do based on m_host - resolve hostname or upload to ip
|
// decide what to do based on m_host - resolve hostname or upload to ip
|
||||||
std::vector<boost::asio::ip::address> resolved_addr;
|
std::vector<boost::asio::ip::address> resolved_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user