use std::fmt::Write; use std::sync::Arc; use hyper::{Body, Response}; use garage_model::garage::Garage; use crate::error::*; pub fn handle_get_bucket_location(garage: Arc) -> Result, Error> { let mut xml = String::new(); writeln!(&mut xml, r#""#).unwrap(); writeln!( &mut xml, r#"{}"#, garage.config.s3_api.s3_region ) .unwrap(); Ok(Response::builder() .header("Content-Type", "application/xml") .body(Body::from(xml.into_bytes()))?) }