fix handling of more than 2 repetitions of same mail header #1144

Merged
merged 1 commit into from Mar 18, 2014

Projects

None yet

3 participants

@colinsurprenant

No description provided.

@electrical

LGTM

@jordansissel jordansissel commented on the diff Feb 28, 2014
lib/logstash/inputs/imap.rb
@@ -118,7 +118,7 @@ def parse_mail(mail)
# promote string to array if a header appears multiple times
# (like 'received')
when String; event[name] = [event[name], value]
- when Array; event[name].is_a?(Array)
+ when Array; event[name] << value
@jordansissel
jordansissel Feb 28, 2014

oof I just realized.

This should be += value, not << value.

@jordansissel
jordansissel Feb 28, 2014

Ignore me, I totally misread the code here. This looks correct.

@jordansissel jordansissel merged commit 5ed9c5e into elastic:master Mar 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment