mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-20 22:41:38 +02:00
refactor(network): drop the ignored insecure_tls parameter inside Rust
NetworkService::set_network_compatibility_options ignored the insecure_tls flag by design because TLS verification is never disabled. Remove the parameter from the network service and the extension environment so the dead flag no longer travels through internal layers. The UniFFI method keeps its signature: Kotlin and Swift still pass the flag, and the mobile binding accepts and ignores it until the binding and channel cleanup lands separately.
This commit is contained in:
1 parent
6879df4917
commit
5dbf9e6c29
3 files changed
+5
-5
No files matched your search
@@ -219,11 +219,9 @@ impl ExtensionEnvironment {
|
||||
pub fn set_network_compatibility_options(
|
||||
&self,
|
||||
allow_http: bool,
|
||||
insecure_tls: bool,
|
||||
) -> Result<(), EnvironmentError> {
|
||||
let _operation = self.enter()?;
|
||||
self.network
|
||||
.set_network_compatibility_options(allow_http, insecure_tls);
|
||||
self.network.set_network_compatibility_options(allow_http);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -193,8 +193,10 @@ impl ExtensionEnvironment {
|
||||
allow_http: bool,
|
||||
insecure_tls: bool,
|
||||
) -> Result<(), JsExtensionError> {
|
||||
// Accepted for binding compatibility and ignored: TLS verification is never disabled.
|
||||
let _ = insecure_tls;
|
||||
self.inner
|
||||
.set_network_compatibility_options(allow_http, insecure_tls)
|
||||
.set_network_compatibility_options(allow_http)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ impl NetworkService {
|
||||
|
||||
/// Native compatibility requests may retry HTTPS over HTTP. Extension
|
||||
/// sessions retain their manifest policy. TLS verification is never disabled.
|
||||
pub fn set_network_compatibility_options(&self, allow_http: bool, _insecure_tls: bool) {
|
||||
pub fn set_network_compatibility_options(&self, allow_http: bool) {
|
||||
let mut pool = self.pool.lock().expect("HTTP pool lock");
|
||||
if pool.allow_http_fallback == allow_http {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user