diff --git a/src/mako/Cargo.toml.mako b/src/mako/Cargo.toml.mako index 560bdbc3a4..6c9b5ac77b 100644 --- a/src/mako/Cargo.toml.mako +++ b/src/mako/Cargo.toml.mako @@ -26,7 +26,7 @@ path = "src/main.rs" % endif [dependencies] -hyper-rustls = "^0.22" +hyper-rustls = "0.23.0" ## Must match the one hyper uses, otherwise there are duplicate similarly named `Mime` structs mime = "^ 0.2.0" serde = "^ 1.0" diff --git a/src/mako/api/lib/lib.mako b/src/mako/api/lib/lib.mako index b9f722814c..3a7ea6bf82 100644 --- a/src/mako/api/lib/lib.mako +++ b/src/mako/api/lib/lib.mako @@ -261,7 +261,7 @@ let auth = oauth2::InstalledFlowAuthenticator::builder( secret, oauth2::InstalledFlowReturnMethod::HTTPRedirect, ).build().await.unwrap(); -let mut hub = ${hub_type}::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), auth);\ +let mut hub = ${hub_type}::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);\ ## You will still have to set the filter for your comment type - either nothing, or rust_doc_comment ! diff --git a/src/mako/cli/lib/engine.mako b/src/mako/cli/lib/engine.mako index e3f2f4b59f..1aaed33930 100644 --- a/src/mako/cli/lib/engine.mako +++ b/src/mako/cli/lib/engine.mako @@ -121,7 +121,13 @@ impl<'n> Engine<'n> { oauth2::InstalledFlowReturnMethod::HTTPRedirect, ).persist_tokens_to_disk(format!("{}/${util.program_name()}", config_dir)).build().await.unwrap(); - let client = hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()); + let client = hyper::Client::builder().build( + hyper_rustls::HttpsConnector::with_native_roots() + .https_or_http() + .enable_http1() + .enable_http2() + .build() + ); <% gpm = gen_global_parameter_names(parameters) %>\ let engine = Engine { opt: opt,