in src/azure/client.rs [230:258]
fn with_attributes(self, attributes: Attributes) -> Self {
let mut builder = self.builder;
let mut has_content_type = false;
for (k, v) in &attributes {
builder = match k {
Attribute::CacheControl => builder.header(&MS_CACHE_CONTROL, v.as_ref()),
Attribute::ContentDisposition => {
builder.header(&MS_CONTENT_DISPOSITION, v.as_ref())
}
Attribute::ContentEncoding => builder.header(&MS_CONTENT_ENCODING, v.as_ref()),
Attribute::ContentLanguage => builder.header(&MS_CONTENT_LANGUAGE, v.as_ref()),
Attribute::ContentType => {
has_content_type = true;
builder.header(&MS_CONTENT_TYPE, v.as_ref())
}
Attribute::Metadata(k_suffix) => builder.header(
&format!("{}{}", USER_DEFINED_METADATA_HEADER_PREFIX, k_suffix),
v.as_ref(),
),
};
}
if !has_content_type {
if let Some(value) = self.config.client_options.get_content_type(self.path) {
builder = builder.header(&MS_CONTENT_TYPE, value);
}
}
Self { builder, ..self }
}