Skip to content

Commit c10f743

Browse files
committed
Fix cache control headers set for S3 uploads
The headers intended for crates and readme uploads were swapped.
1 parent ef7cfd3 commit c10f743

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uploaders.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl Uploader {
139139
let content_length = body.len() as u64;
140140
let content = Cursor::new(body);
141141
let mut extra_headers = header::HeaderMap::new();
142-
extra_headers.insert(header::CACHE_CONTROL, CACHE_CONTROL_README.parse().unwrap());
142+
extra_headers.insert(header::CACHE_CONTROL, CACHE_CONTROL_IMMUTABLE.parse().unwrap());
143143
self.upload(
144144
app.http_client(),
145145
&path,
@@ -164,7 +164,7 @@ impl Uploader {
164164
let mut extra_headers = header::HeaderMap::new();
165165
extra_headers.insert(
166166
header::CACHE_CONTROL,
167-
CACHE_CONTROL_IMMUTABLE.parse().unwrap(),
167+
CACHE_CONTROL_README.parse().unwrap(),
168168
);
169169
self.upload(
170170
http_client,

0 commit comments

Comments
 (0)