Open Meteplus opened 1 year ago
is this the same reason causes such an error? https://github.com/seanmonstar/reqwest/issues/923#issuecomment-633986139
Now I am sure it IS the SSL configuration on the server side causes this error, because I took a try to post to https://www.google.com the request done we'll and got namal responses
Does tauri2.0 uses rustls for ssl? And the rustls does'nt support the weak or insecure ciphers such as TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 and so on,this caused same problems mentioned here: https://github.com/SeerLabs/CiteSeerX/issues/80#issuecomment-830789613
For my part it was something with rust being stricter with the ssl certificate and the default cipher did not make the cut. I had to do this.
// cargo.toml
reqwest = { version = "0.12.4", default-features = false, features = ["json", "rustls-tls", "blocking"] }
// lib.rs
let client = reqwest::Client::builder().use_rustls_tls().build().unwrap();
let response = client.post("url").send().await?
let result: serde_json::Value = response.json().await?;
Note: Im new to rust and java so i don't know much about it. I just found it out by reading lots and lots of stuff.
Got also help from https://stackoverflow.com/questions/77825270/rust-reqwest-with-certificate-and-key-fails-to-be-authorised
Describe the bug
I used tauri::api::http::ClientBuilder and HttpRequestBuilder::new("POST", "https://...") to make a https request ,but i got this:
04-22 11:36:05.537 31981 32013 I RustStdoutStderr: thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()
on anErr
value: Network(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("www.zhibei.biz")), port: None, path: "/tauri/marqo.jsp", query: None, fragment: None }, source: hyper::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: AlertReceived(HandshakeFailure) } }) })', src\lib.rs:24:13 04-22 11:36:05.538 31981 32013 I RustStdoutStderr: note: run withRUST_BACKTRACE=1
environment variable to display a backtraceBUT,after changed the URL to http://... everything is ok!!!!!
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
Additional context
No response