mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
53c5bf546e
This changes the error handling model of ServerHttp2Stream, ServerHttp2Request and ServerHttp2Response. An 'error' emitted on ServerHttp2Stream will not go to 'uncaughtException' anymore, but to the server 'streamError'. On the stream 'error', ServerHttp2Request will emit 'abort', while ServerHttp2Response would do nothing. It also updates respondWith* to the new error handling. Fixes: https://github.com/nodejs/node/issues/14963 PR-URL: https://github.com/nodejs/node/pull/14991 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
32 lines
573 B
JavaScript
32 lines
573 B
JavaScript
'use strict';
|
|
|
|
process.emitWarning(
|
|
'The http2 module is an experimental API.',
|
|
'ExperimentalWarning', undefined,
|
|
'See https://github.com/nodejs/http2'
|
|
);
|
|
|
|
const {
|
|
constants,
|
|
getDefaultSettings,
|
|
getPackedSettings,
|
|
getUnpackedSettings,
|
|
createServer,
|
|
createSecureServer,
|
|
connect,
|
|
Http2ServerRequest,
|
|
Http2ServerResponse
|
|
} = require('internal/http2/core');
|
|
|
|
module.exports = {
|
|
constants,
|
|
getDefaultSettings,
|
|
getPackedSettings,
|
|
getUnpackedSettings,
|
|
createServer,
|
|
createSecureServer,
|
|
connect,
|
|
Http2ServerResponse,
|
|
Http2ServerRequest
|
|
};
|