From 96f090617ae1b69d3c9718c29eedb99e7ded4523 Mon Sep 17 00:00:00 2001 From: Tahmid Hasan Date: Wed, 17 Apr 2019 15:02:09 -0700 Subject: [PATCH] [Zanzibar] Fix checkHeader parsing to check presence, not emptiness --- runtime/server_http_request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/server_http_request.go b/runtime/server_http_request.go index 308487a11..4a7fd4d2e 100644 --- a/runtime/server_http_request.go +++ b/runtime/server_http_request.go @@ -168,8 +168,8 @@ func (req *ServerHTTPRequest) start() { // CheckHeaders verifies that request contains required headers. func (req *ServerHTTPRequest) CheckHeaders(headers []string) bool { for _, headerName := range headers { - headerValue := req.httpRequest.Header.Get(headerName) - if headerValue == "" { + _, ok := req.Header.Get(headerName) + if !ok { req.logger.Warn("Got request without mandatory header", zap.String("headerName", headerName), )