Skip to content

Commit

Permalink
fix cookie parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Jan 4, 2025
1 parent 6de1636 commit c01a60e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/flashy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,15 @@ where
let Ok(cookie_str) = header.to_str() else {
continue;

Check warning on line 167 in lib/flashy/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

lib/flashy/src/lib.rs#L163-L167

Added lines #L163 - L167 were not covered by tests
};
let Ok(cookie) = Cookie::parse(cookie_str.to_string()) else {
continue;
};

jar.add_original(cookie);
let cookies = Cookie::split_parse_encoded(cookie_str.to_string());
for cookie in cookies {
let Ok(cookie) = cookie else {
continue;

Check warning on line 173 in lib/flashy/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

lib/flashy/src/lib.rs#L170-L173

Added lines #L170 - L173 were not covered by tests
};

jar.add_original(cookie);

Check warning on line 176 in lib/flashy/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

lib/flashy/src/lib.rs#L176

Added line #L176 was not covered by tests
}
}

let signed_jar = jar.signed(&self.key);
Expand Down

0 comments on commit c01a60e

Please sign in to comment.