Skip to content

Commit 0b3d1e8

Browse files
committed
feat(http): add cookie for client
1 parent 9ba3062 commit 0b3d1e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

volo-http/src/utils/cookie/store.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ impl CookieStore {
4545
size += key.len() + value.len() + 3;
4646
}
4747

48+
if size == 0 {
49+
return None;
50+
}
51+
4852
let mut s = String::with_capacity(size);
4953

5054
for (name, value) in cookie_iter {
@@ -54,10 +58,6 @@ impl CookieStore {
5458
s.push_str("; ");
5559
}
5660

57-
if s.is_empty() {
58-
return None;
59-
}
60-
6161
HeaderValue::from_maybe_shared(Bytes::from(s)).ok()
6262
}
6363
}

0 commit comments

Comments
 (0)