We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39bc197 commit ea860c4Copy full SHA for ea860c4
examples/api/src-tauri/src/lib.rs
@@ -106,7 +106,11 @@ pub fn run() {
106
107
if !headers.iter().any(|header| header.field == tiny_http::HeaderField::from_bytes(b"Cookie").unwrap()) {
108
let expires = time::OffsetDateTime::now_utc() + time::Duration::days(1);
109
- let expires_str = expires.format(&time::format_description::well_known::Rfc2822).unwrap();
+ // RFC 1123 format
110
+ let format = time::macros::format_description!(
111
+ "[weekday repr:short], [day] [month repr:short] [year] [hour]:[minute]:[second] GMT"
112
+ );
113
+ let expires_str = expires.format(format).unwrap();
114
headers.push(
115
tiny_http::Header::from_bytes(
116
&b"Set-Cookie"[..],
0 commit comments