node/test/simple/test-http-header-obstext.js
James M Snell fa26b13df7 deps: update to http-parser 2.3.2
Fixes http-parser regression with IS_HEADER_CHAR check
Add test case for obstext characters (> 0x80) in header

PR-URL: https://github.com/nodejs/node/pull/5241
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-24 17:18:30 +11:00

18 lines
420 B
JavaScript

'use strict';
var common = require('../common');
var http = require('http');
var assert = require('assert');
var server = http.createServer(common.mustCall(function(req, res) {
res.end('ok');
}));
server.listen(common.PORT, function() {
http.get({
port: common.PORT,
headers: {'Test': 'Düsseldorf'}
}, common.mustCall(function(res) {
assert.equal(res.statusCode, 200);
server.close();
}));
});