Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
fix: Trim space around certificate fields (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninegua authored Feb 8, 2022
1 parent 577d914 commit 6574ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ async fn forward_request(
for HeaderField(name, value) in http_response.headers {
if name.eq_ignore_ascii_case("IC-CERTIFICATE") {
for field in value.split(',') {
if let Some((_, name, b64_value)) = regex_captures!("^(.*)=:(.*):$", field) {
if let Some((_, name, b64_value)) = regex_captures!("^(.*)=:(.*):$", field.trim()) {
slog::trace!(logger, ">> certificate {}: {}", name, b64_value);
let bytes = base64::decode(b64_value).map_err(|e| {
slog::warn!(
Expand Down

0 comments on commit 6574ca4

Please sign in to comment.