Skip to content

Commit

Permalink
http: use first line of header
Browse files Browse the repository at this point in the history
  • Loading branch information
CapacitorSet committed Jul 10, 2018
1 parent 2b43dab commit 71e074c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ func (s *httpService) SetChannel(c pushers.Channel) {
s.c = c
}

func Headers(headers map[string][]string) event.Option {
func Headers(headers http.Header) event.Option {
return func(m event.Event) {
for name, h := range headers {
m.Store(fmt.Sprintf("http.header.%s", strings.ToLower(name)), h)
for name := range headers {
m.Store(fmt.Sprintf("http.header.%s", strings.ToLower(name)), headers.Get(name))
}
}
}
Expand Down

0 comments on commit 71e074c

Please sign in to comment.