File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,8 @@ func (r *ProxyResponseWriter) GetProxyResponse() (events.APIGatewayProxyResponse
103
103
isBase64 = true
104
104
}
105
105
106
- proxyHeaders := make (map [string ]string )
107
-
108
- for h := range r .headers {
109
- proxyHeaders [h ] = r .headers .Get (h )
110
- }
111
-
112
106
return events.APIGatewayProxyResponse {
113
107
StatusCode : r .status ,
114
- Headers : proxyHeaders ,
115
108
MultiValueHeaders : http .Header (r .headers ),
116
109
Body : output ,
117
110
IsBase64Encoded : isBase64 ,
Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ var _ = Describe("ResponseWriter tests", func() {
153
153
proxyResponse , err := response .GetProxyResponse ()
154
154
Expect (err ).To (BeNil ())
155
155
156
- // Headers are also written to `Headers` field
157
- Expect (1 ).To (Equal (len (proxyResponse .Headers )))
156
+ // Headers are not also written to `Headers` field
157
+ Expect (0 ).To (Equal (len (proxyResponse .Headers )))
158
158
Expect (1 ).To (Equal (len (proxyResponse .MultiValueHeaders ["Content-Type" ])))
159
159
Expect ("application/json" ).To (Equal (proxyResponse .MultiValueHeaders ["Content-Type" ][0 ]))
160
160
})
@@ -167,8 +167,8 @@ var _ = Describe("ResponseWriter tests", func() {
167
167
proxyResponse , err := response .GetProxyResponse ()
168
168
Expect (err ).To (BeNil ())
169
169
170
- // Headers are also written to `Headers` field
171
- Expect (2 ).To (Equal (len (proxyResponse .Headers )))
170
+ // Headers are not also written to `Headers` field
171
+ Expect (0 ).To (Equal (len (proxyResponse .Headers )))
172
172
173
173
// There are two headers here because Content-Type is always written implicitly
174
174
Expect (2 ).To (Equal (len (proxyResponse .MultiValueHeaders ["Set-Cookie" ])))
You can’t perform that action at this time.
0 commit comments