Fix stable build
This commit is contained in:
parent
85cbb1d6d8
commit
89e7719939
|
@ -1,4 +1,6 @@
|
|||
use tokio::io::{AsyncRead, AsyncReadExt};
|
||||
use tokio::io::AsyncRead;
|
||||
#[cfg(feature="scgi_srv")]
|
||||
use tokio::io::AsyncReadExt;
|
||||
#[cfg(feature="serve_dir")]
|
||||
use tokio::fs::File;
|
||||
|
||||
|
@ -13,6 +15,7 @@ pub enum Body {
|
|||
|
||||
impl Body {
|
||||
/// Called by [`Response::rewrite_all`]
|
||||
#[cfg(feature="scgi_srv")]
|
||||
pub (crate) async fn rewrite_all(&mut self, based_on: &crate::Request) -> std::io::Result<bool> {
|
||||
let bytes = match self {
|
||||
Self::Bytes(bytes) => {
|
||||
|
|
|
@ -59,6 +59,7 @@ impl Request {
|
|||
.map(|hsh| {
|
||||
ring::test::from_hex(hsh.as_str())
|
||||
.expect("Received invalid certificate fingerprint from upstream")
|
||||
.as_slice()
|
||||
.try_into()
|
||||
.expect("Received certificate fingerprint of invalid lenght from upstream")
|
||||
}),
|
||||
|
@ -239,7 +240,7 @@ impl Request {
|
|||
})
|
||||
}
|
||||
#[cfg(feature = "gemini_srv")] {
|
||||
Some(path.to_string())
|
||||
Some(path.as_ref().to_string())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ impl Response {
|
|||
self.status == 10
|
||||
}
|
||||
|
||||
#[cfg_attr(feature="gemini_srv",allow(unused_variables))]
|
||||
/// Rewrite any links in this response based on the path identified by a request
|
||||
///
|
||||
/// For more information about what rewriting a link means, see
|
||||
|
|
Loading…
Reference in a new issue