Skip to content

Commit

Permalink
Updates test for multiple headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
botic committed Apr 12, 2013
1 parent 5675de1 commit f4368ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/ringo/httpserver_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@ exports.testMultipleHeaders = function () {
assert.equal(req.scheme, "http");

assert.equal(req.headers.host, host + ":" + port); // This follows RFC 2616!
assert.equal(req.headers["x-foo"], "bar, baz, 012345;q=15");
assert.equal(req.headers["x-foo-single"], "single-bar");
assert.equal(req.headers["x-foo"], "bar");

var headersArray = [];
for (var headers = req.env.servletRequest.getHeaders("x-foo"); headers.hasMoreElements(); ) {
headersArray.push(headers.nextElement());
}
assert.equal("bar, baz, 012345;q=15", headersArray.join(", "));
};

var connection = (new java.net.URL(baseUri)).openConnection();
Expand Down

0 comments on commit f4368ef

Please sign in to comment.