mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
		
						commit
						434a182b0a
					
				
					 7 changed files with 35 additions and 3 deletions
				
			
		|  | @ -396,6 +396,7 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr | |||
|         m_optgroup->append_line(cafile_hint); | ||||
|     } | ||||
|     else { | ||||
|          | ||||
|         Line line{ "", "" }; | ||||
|         line.full_width = 1; | ||||
| 
 | ||||
|  | @ -411,8 +412,14 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr | |||
|             sizer->Add(txt, 1, wxEXPAND); | ||||
|             return sizer; | ||||
|         }; | ||||
| 
 | ||||
|         m_optgroup->append_line(line); | ||||
| 
 | ||||
| #ifdef WIN32 | ||||
|         option = m_optgroup->get_option("printhost_ignore_check"); | ||||
|         option.opt.width = Field::def_width_wider(); | ||||
|         m_optgroup->append_single_option_line(option); | ||||
| #endif | ||||
|         | ||||
|     } | ||||
| 
 | ||||
|     for (const std::string& opt_key : std::vector<std::string>{ "printhost_user", "printhost_password" }) {         | ||||
|  |  | |||
|  | @ -491,6 +491,14 @@ Http& Http::form_add_file(const std::string &name, const fs::path &path, const s | |||
| 	return *this; | ||||
| } | ||||
| 
 | ||||
| Http& Http::revoke_best_effort(bool set) | ||||
| { | ||||
| 	if(p && set){ | ||||
| 		::curl_easy_setopt(p->curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT); | ||||
| 	} | ||||
| 	return *this; | ||||
| } | ||||
| 
 | ||||
| Http& Http::set_post_body(const fs::path &path) | ||||
| { | ||||
| 	if (p) { p->set_post_body(path);} | ||||
|  |  | |||
|  | @ -80,6 +80,8 @@ public: | |||
| 	// Same as above except also override the file's filename with a custom one
 | ||||
| 	Http& form_add_file(const std::string &name, const boost::filesystem::path &path, const std::string &filename); | ||||
| 
 | ||||
| 	Http& revoke_best_effort(bool set); | ||||
| 
 | ||||
| 	// Set the file contents as a POST request body.
 | ||||
| 	// The data is used verbatim, it is not additionally encoded in any way.
 | ||||
| 	// This can be used for hosts which do not support multipart requests.
 | ||||
|  |  | |||
|  | @ -25,7 +25,8 @@ namespace Slic3r { | |||
| OctoPrint::OctoPrint(DynamicPrintConfig *config) : | ||||
|     host(config->opt_string("print_host")), | ||||
|     apikey(config->opt_string("printhost_apikey")), | ||||
|     cafile(config->opt_string("printhost_cafile")) | ||||
|     cafile(config->opt_string("printhost_cafile")), | ||||
|     ignore_checks(config->opt_bool("printhost_ignore_check")) | ||||
| {} | ||||
| 
 | ||||
| const char* OctoPrint::get_name() const { return "OctoPrint"; } | ||||
|  | @ -73,6 +74,9 @@ bool OctoPrint::test(wxString &msg) const | |||
|                 msg = "Could not parse server response"; | ||||
|             } | ||||
|         }) | ||||
| #ifdef WIN32 | ||||
|         .revoke_best_effort(ignore_checks) | ||||
| #endif | ||||
|         .perform_sync(); | ||||
| 
 | ||||
|     return res; | ||||
|  | @ -137,6 +141,9 @@ bool OctoPrint::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Erro | |||
|                 res = false; | ||||
|             } | ||||
|         }) | ||||
| #ifdef WIN32 | ||||
|         .revoke_best_effort(ignore_checks) | ||||
| #endif | ||||
|         .perform_sync(); | ||||
| 
 | ||||
|     return res; | ||||
|  |  | |||
|  | @ -40,6 +40,7 @@ private: | |||
|     std::string host; | ||||
|     std::string apikey; | ||||
|     std::string cafile; | ||||
|     bool        ignore_checks; | ||||
| 
 | ||||
|     virtual void set_auth(Http &http) const; | ||||
|     std::string make_url(const std::string &path) const; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966