bidord opened a new issue, #769: URL: https://github.com/apache/arrow-rs-object-store/issues/769
**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](https://datatracker.ietf.org/doc/html/rfc9110#section-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](https://datatracker.ietf.org/doc/html/rfc9110#name-preconditions) that `GetOptions::if_match` and `GetOptions::if_none_match` are documented against in this crate's own [docs](https://docs.rs/object_store/latest/object_store/struct.GetOptions.html). **To Reproduce** ```rust 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
