+ let data = hyper::Body::from(data);
+ Ok::<_,AE>(
+ hyper::Response::builder()
+ .header("Content-Type", r#"application/octet-stream"#)
+ .body(data)
+ )
+ }.await.unwrap_or_else(|e| {
+ debug!("{} error {}", &conn, &e);
+ let mut errmsg = format!("ERROR\n\n{:?}\n\n", &e);
+ for w in warnings.warnings {
+ write!(errmsg, "warning: {}\n", w).unwrap();
+ }
+ hyper::Response::builder()
+ .status(hyper::StatusCode::BAD_REQUEST)
+ .header("Content-Type", r#"text/plain; charset="utf-8""#)
+ .body(errmsg.into())
+ })