mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 06:38:13 +00:00

Fixes http-parser regression with IS_HEADER_CHAR check Add test case for obstext characters (> 0x80) is header PR-URL: https://github.com/nodejs/node/pull/5237 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
19 lines
414 B
JavaScript
19 lines
414 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const http = require('http');
|
|
const assert = require('assert');
|
|
|
|
const server = http.createServer(common.mustCall((req, res) => {
|
|
res.end('ok');
|
|
}));
|
|
server.listen(common.PORT, () => {
|
|
http.get({
|
|
port: common.PORT,
|
|
headers: {'Test': 'Düsseldorf'}
|
|
}, common.mustCall((res) => {
|
|
assert.equal(res.statusCode, 200);
|
|
server.close();
|
|
}));
|
|
});
|