Describe the bug
InMemory and LocalFileSystem return ETags as bare tokens (e.g. abc123) instead of the quoted-string form required by RFC 9110 §8.8.3 (e.g. "abc123").
Cloud-backed stores (AWS, Azure, GCP) return ETags in the correct quoted form, since they reflect what the HTTP server returns. This makes InMemory and LocalFileSystem inconsistent with the cloud backends and non-compliant with the preconditions spec that GetOptions::if_match and GetOptions::if_none_match are documented against in this crate's own docs.
To Reproduce
use object_store::ObjectStoreExt;
use object_store::aws::AmazonS3Builder;
use object_store::azure::MicrosoftAzureBuilder;
use object_store::gcp::GoogleCloudStorageBuilder;
use object_store::local::LocalFileSystem;
use object_store::memory::InMemory;
use object_store::path::Path;
use tempfile::tempdir;
#[tokio::test]
async fn etag_format() {
let path = Path::from("etag_format_test");
let store = InMemory::new();
let result = store.put(&path, "hello".into()).await.unwrap();
println!("InMemory e_tag: {:?}", result.e_tag);
let tmp = tempdir().unwrap();
let store = LocalFileSystem::new_with_prefix(tmp.path()).unwrap();
let result = store.put(&path, "hello".into()).await.unwrap();
println!("Local e_tag: {:?}", result.e_tag);
let store = AmazonS3Builder::from_env().build().unwrap();
let result = store.put(&path, "hello".into()).await.unwrap();
println!("AWS e_tag: {:?}", result.e_tag);
let store = MicrosoftAzureBuilder::from_env().build().unwrap();
let result = store.put(&path, "hello".into()).await.unwrap();
println!("Azure e_tag: {:?}", result.e_tag);
let store = GoogleCloudStorageBuilder::from_env().build().unwrap();
let result = store.put(&path, "hello".into()).await.unwrap();
println!("GCP e_tag: {:?}", result.e_tag);
}
InMemory e_tag: Some("0")
Local e_tag: Some("1cc9cd-6549c8a45a90c-5")
AWS e_tag: Some("\"5d41402abc4b2a76b9719d911017c592\"")
Azure e_tag: Some("\"0x1BEDBB9371F4B80\"")
GCP e_tag: Some("\"XUFAKrxLKna5cZ2REBfFkg==\"")
Expected behavior
InMemory and LocalFileSystem should return ETags in the form "<value>", consistent with cloud backends and RFC 9110.
Additional context
N/A
Describe the bug
InMemoryandLocalFileSystemreturn ETags as bare tokens (e.g.abc123) instead of the quoted-string form required by RFC 9110 §8.8.3 (e.g."abc123").Cloud-backed stores (AWS, Azure, GCP) return ETags in the correct quoted form, since they reflect what the HTTP server returns. This makes
InMemoryandLocalFileSysteminconsistent with the cloud backends and non-compliant with the preconditions spec thatGetOptions::if_matchandGetOptions::if_none_matchare documented against in this crate's own docs.To Reproduce
Expected behavior
InMemoryandLocalFileSystemshould return ETags in the form"<value>", consistent with cloud backends and RFC 9110.Additional context
N/A