This repository was archived by the owner on Jan 21, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,8 +286,35 @@ func TestSourceWithHeaders(t *testing.T) {
286286 any := types .AnyString (view )
287287 headers := map [string ]interface {}{}
288288 require .NoError (t , any .Decode (& headers ))
289+
290+ // Looks like httpbin.org's handling of repeating headers has changed:
291+ //
292+ // $ curl -i -H "A:B" -H "Foo:Bar" -H "Foo:Bar" https://httpbin.org/headers
293+ // HTTP/1.1 200 OK
294+ // Connection: keep-alive
295+ // Server: meinheld/0.6.1
296+ // Date: Thu, 11 May 2017 18:50:08 GMT
297+ // Content-Type: application/json
298+ // Access-Control-Allow-Origin: *
299+ // Access-Control-Allow-Credentials: true
300+ // X-Powered-By: Flask
301+ // X-Processed-Time: 0.000694990158081
302+ // Content-Length: 167
303+ // Via: 1.1 vegur
304+
305+ // {
306+ // "headers": {
307+ // "A": "B",
308+ // "Accept": "*/*",
309+ // "Connection": "close",
310+ // "Foo": "Bar",
311+ // "Host": "httpbin.org",
312+ // "User-Agent": "curl/7.43.0"
313+ // }
314+ // }
315+
289316 require .Equal (t , map [string ]interface {}{
290- "Foo" : "Bar,Bar " ,
317+ "Foo" : "Bar" ,
291318 "Host" : "httpbin.org" ,
292319 "User-Agent" : "Go-http-client/1.1" ,
293320 "A" : "B" ,
You can’t perform that action at this time.
0 commit comments