Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
// addr: SocketAddr,
req: hyper::Request<hyper::Body>
) -> Result<hyper::Response<hyper::Body>, Infallible> {
+ if req.method() == Method::GET {
+ let mut resp = hyper::Response::new(hyper::Body::from("hippotat\r\n"));
+ resp.headers_mut().insert(
+ "Content-Type",
+ "text/plain; charset=US-ASCII".try_into().unwrap()
+ );
+ return Ok(resp)
+ }
+
let mut warnings: Warnings = default();
match async {
pub use fehler::{throw, throws};
pub use futures::{poll, future, StreamExt as _};
pub use hyper::body::{Bytes, Buf as _};
-pub use hyper::Uri;
+pub use hyper::{Method, Uri};
pub use hyper_tls::HttpsConnector;
pub use ipnet::IpNet;
pub use itertools::{iproduct, Itertools};