diff --git a/src/iisnode/chttpprotocol.cpp b/src/iisnode/chttpprotocol.cpp
index a04193e..d0bb3ed 100644
--- a/src/iisnode/chttpprotocol.cpp
+++ b/src/iisnode/chttpprotocol.cpp
@@ -498,7 +498,7 @@ HRESULT CHttpProtocol::ParseResponseHeaders(CNodeHttpStoredContext* context)
while (*(data + nameEndOffset) == ' ') // data is already zero-terminated, so this loop has sentinel value
nameEndOffset++;
- CheckError(response->SetHeader(data + offset, data + nameEndOffset, valueEndOffset - nameEndOffset, TRUE));
+ CheckError(response->SetHeader(data + offset, data + nameEndOffset, valueEndOffset - nameEndOffset, FALSE));
}
else if ((valueEndOffset - nameEndOffset) >= 5 && 0 == memcmp((void*)(data + valueEndOffset - 5), "close", 5))
{
diff --git a/src/iisnode/iisnode.vcxproj b/src/iisnode/iisnode.vcxproj
index 8ee0c86..598885c 100644
--- a/src/iisnode/iisnode.vcxproj
+++ b/src/iisnode/iisnode.vcxproj
@@ -255,6 +255,7 @@ copy /y $(ProjectDir)\..\config\* $(ProjectDir)\..\..\build\$(Configuration)\$(P
+
@@ -310,6 +311,8 @@ copy /y $(ProjectDir)\..\config\* $(ProjectDir)\..\..\build\$(Configuration)\$(P
+
+
diff --git a/src/iisnode/iisnode.vcxproj.filters b/src/iisnode/iisnode.vcxproj.filters
index cf28bbd..222d451 100644
--- a/src/iisnode/iisnode.vcxproj.filters
+++ b/src/iisnode/iisnode.vcxproj.filters
@@ -132,6 +132,9 @@
{53a23746-6411-4600-8315-bc8a1b2120da}
+
+ {53b5e674-69d5-4bae-9629-49cd8b7c7c45}
+
@@ -576,6 +579,15 @@
Tests\functional\www\121_watchedFiles
+
+ Tests\functional\www\122_multipleResponseHeaders
+
+
+ Tests\functional\www\122_multipleResponseHeaders
+
+
+ Tests\functional\tests
+
diff --git a/test/functional/tests/122_multipleResponseHeaders.js b/test/functional/tests/122_multipleResponseHeaders.js
new file mode 100644
index 0000000..8d0790f
--- /dev/null
+++ b/test/functional/tests/122_multipleResponseHeaders.js
@@ -0,0 +1,26 @@
+/*
+A simple GET request receives a hello world response
+*/
+
+var net = require('net')
+ , assert = require('assert');
+
+var timeout = setTimeout(function () {
+ console.error('Timeout occurred');
+ assert.ok(false, 'request timed out');
+}, 10000);
+
+var host = process.env.IISNODETEST_HOST || 'localhost';
+var port = process.env.IISNODETEST_PORT || 31415;
+
+var client = net.connect(port, host, function () {
+ client.setEncoding('utf8');
+ client.write('GET /122_multipleResponseHeaders/hello.js HTTP/1.1\r\nHost: ' + host + ':' + port + '\r\n\r\n');
+});
+
+client.on('data', function (data) {
+ clearTimeout(timeout);
+ assert.ok(data.indexOf('Foo: Val1') > 0, 'First instance of Foo header exists in the response');
+ assert.ok(data.indexOf('Foo: Val2') > 0, 'Second instance of Foo header exists in the response');
+ client.end();
+});
\ No newline at end of file
diff --git a/test/functional/www/122_multipleResponseHeaders/hello.js b/test/functional/www/122_multipleResponseHeaders/hello.js
new file mode 100644
index 0000000..a297102
--- /dev/null
+++ b/test/functional/www/122_multipleResponseHeaders/hello.js
@@ -0,0 +1,6 @@
+var http = require('http');
+
+http.createServer(function (req, res) {
+ res.writeHead(200, [['Foo','Val1'], ['Foo','Val2']]);
+ res.end('Hello, world!');
+}).listen(process.env.PORT);
\ No newline at end of file
diff --git a/test/functional/www/122_multipleResponseHeaders/web.config b/test/functional/www/122_multipleResponseHeaders/web.config
new file mode 100644
index 0000000..ae902f5
--- /dev/null
+++ b/test/functional/www/122_multipleResponseHeaders/web.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+