Skip to content

Commit 3028455

Browse files
committed
AWS Lambda: Fix validation issues
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
1 parent f9b6f51 commit 3028455

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

pkg/middlewares/awslambda/aws_lambda.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (a *awsLambda) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
164164
// If sending data through cURL on the commandline and
165165
// the content-type header is missed, orr for
166166
// applications that aren't explicitly setting Content-Type,
167-
// override to 'application/json' if the body looks like JSON
167+
// override to 'application/json' if the body looks like JSON.
168168
if isJSON(reqBody) {
169169
req.Header.Set("Content-Type", "application/json")
170170
}
@@ -360,19 +360,6 @@ func headersToMap(h http.Header) map[string]string {
360360
return values
361361
}
362362

363-
func headersToMultiMap(h http.Header) map[string][]string {
364-
values := map[string][]string{}
365-
for name, headers := range h {
366-
if len(headers) < 2 {
367-
continue
368-
}
369-
370-
values[name] = headers
371-
}
372-
373-
return values
374-
}
375-
376363
func valueToString(f interface{}) (string, bool) {
377364
var v string
378365
typeof := reflect.TypeOf(f)

0 commit comments

Comments
 (0)