Skip to content

Commit

Permalink
Merge pull request #168 from rutgerbrf/fix-166
Browse files Browse the repository at this point in the history
Don't split a header into more than two parts
  • Loading branch information
spacejam authored Apr 12, 2021
2 parents 357cfb6 + 0b09837 commit db3d0cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl TryFrom<&[u8]> for Headers {
};

for line in lines {
let splits = line.split(':').map(str::trim).collect::<Vec<_>>();
let splits = line.splitn(2, ':').map(str::trim).collect::<Vec<_>>();
match splits[..] {
[k, v] => {
let entry = inner
Expand Down

0 comments on commit db3d0cf

Please sign in to comment.