forked from Deuxfleurs/garage
Fix #28, extra headers being ignored (because of profound stupidity)
This commit is contained in:
parent
76390085ef
commit
02d512f3fd
2 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,8 @@ fn object_headers(
|
||||||
version: &ObjectVersion,
|
version: &ObjectVersion,
|
||||||
version_meta: &ObjectVersionMeta,
|
version_meta: &ObjectVersionMeta,
|
||||||
) -> http::response::Builder {
|
) -> http::response::Builder {
|
||||||
|
debug!("Version meta: {:?}", version_meta);
|
||||||
|
|
||||||
let date = UNIX_EPOCH + Duration::from_millis(version.timestamp);
|
let date = UNIX_EPOCH + Duration::from_millis(version.timestamp);
|
||||||
let date_str = httpdate::fmt_http_date(date);
|
let date_str = httpdate::fmt_http_date(date);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@ pub async fn handle_put(
|
||||||
|
|
||||||
// Retrieve interesting headers from request
|
// Retrieve interesting headers from request
|
||||||
let headers = get_headers(&req)?;
|
let headers = get_headers(&req)?;
|
||||||
|
debug!("Object headers: {:?}", headers);
|
||||||
|
|
||||||
let content_md5 = match req.headers().get("content-md5") {
|
let content_md5 = match req.headers().get("content-md5") {
|
||||||
Some(x) => Some(x.to_str()?.to_string()),
|
Some(x) => Some(x.to_str()?.to_string()),
|
||||||
None => None,
|
None => None,
|
||||||
|
@ -578,7 +580,7 @@ fn get_headers(req: &Request<Body>) -> Result<ObjectVersionHeaders, Error> {
|
||||||
}
|
}
|
||||||
Ok(ObjectVersionHeaders {
|
Ok(ObjectVersionHeaders {
|
||||||
content_type,
|
content_type,
|
||||||
other: BTreeMap::new(),
|
other,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue