mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: modify tests to support the latest llhttp
PR-URL: https://github.com/nodejs-private/node-private/pull/219 Reviewed-by: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
65415049af
commit
edad52e243
2 files changed
+8
-1
No files matched your search
@@ -40,6 +40,7 @@ const methods = [
|
||||
'LOCK',
|
||||
'MKCOL',
|
||||
'MOVE',
|
||||
'PRI',
|
||||
'PROPFIND',
|
||||
'PROPPATCH',
|
||||
'SEARCH',
|
||||
|
||||
@@ -5,12 +5,18 @@ const common = require('../common');
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
const assert = require('assert');
|
||||
const http = require('http');
|
||||
const http2 = require('http2');
|
||||
const { NghttpError } = require('internal/http2/util');
|
||||
|
||||
// Creating an http1 server here...
|
||||
const server = http.createServer(common.mustNotCall());
|
||||
// NOTE: PRI method is supported by our HTTP parser - thus the response handling
|
||||
// function must be called once before error.
|
||||
const server = http.createServer(common.mustCall((req, res) => {
|
||||
assert.strictEqual(req.method, 'PRI');
|
||||
res.end();
|
||||
}));
|
||||
|
||||
server.listen(0, common.mustCall(() => {
|
||||
const client = http2.connect(`http://localhost:${server.address().port}`);
|
||||
|
||||
Reference in new issue
Block a user