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:
zarzet committed 2026-10-18 22:22:57 +07:00
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(())
}
+3 -1
View File
@@ -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)
}
+1 -1
View File
@@ -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;