Skip to content

Commit a9071e1

Browse files
skokalinac000
authored andcommitted
tests: nodejs: Added test for responses with duplicate headers
Signed-off-by: Andrew Clayton <[email protected]>
1 parent 9ae1067 commit a9071e1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
require('http').createServer(function (req, res) {
3+
res.setHeader('Set-Cookie', ['tc=one,two,three', 'tc=four,five,six']);
4+
res.setHeader('Set-Cookie', ['tc=one,two,three', 'tc=four,five,six', 'tc=seven,eight,nine']);
5+
res.end();
6+
}).listen(8080);

test/test_node_application.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ def test_node_application_set_header_array():
234234
], 'set header array'
235235

236236

237+
def test_node_application_set_header_array_with_override():
238+
client.load('set_header_array_with_override')
239+
240+
assert client.get()['headers']['Set-Cookie'] == [
241+
'tc=one,two,three',
242+
'tc=four,five,six',
243+
'tc=seven,eight,nine',
244+
], 'set header array with override'
245+
246+
237247
@pytest.mark.skip('not yet')
238248
def test_node_application_status_message():
239249
client.load('status_message')

0 commit comments

Comments
 (0)