Skip to content

Commit

Permalink
fixed issue with multiple leading spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Apr 18, 2024
1 parent c393223 commit ae786ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/config/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,15 @@ impl Configuration {
// all other items in the iterator returned by split, when combined with the
// original split deliminator (:), make up the header's final value
let value = split_val.collect::<Vec<&str>>().join(":");
config.headers.insert(name.to_string(), value.to_string());

if value.starts_with(' ') && !value.starts_with(" ") {
// first character is a space and the second character isn't
// we can trim the leading space
let trimmed = value.trim_start();
config.headers.insert(name.to_string(), trimmed.to_string());
} else {
config.headers.insert(name.to_string(), value.to_string());
}
}
}

Expand Down

0 comments on commit ae786ea

Please sign in to comment.