mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Inline payload limit
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { IApcHandler, IHandlerCollection, ApcFallbackHandlerType, IApcParser, ISubParserStackState } from 'common/parser/Types';
|
||||
import { ApcState, PAYLOAD_LIMIT } from 'common/parser/Constants';
|
||||
import { ApcState, ParserConstants } from 'common/parser/Constants';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IDisposable } from 'common/Types';
|
||||
|
||||
@@ -199,7 +199,7 @@ export class ApcParser implements IApcParser {
|
||||
* as APC handlers.
|
||||
*/
|
||||
export class ApcHandler implements IApcHandler {
|
||||
private static PAYLOAD_LIMIT = PAYLOAD_LIMIT;
|
||||
private static PAYLOAD_LIMIT = ParserConstants.PAYLOAD_LIMIT;
|
||||
|
||||
private _data = '';
|
||||
private _hitLimit: boolean = false;
|
||||
|
||||
@@ -71,4 +71,6 @@ export const enum ApcState {
|
||||
}
|
||||
|
||||
// payload limit for OSC and DCS
|
||||
export const PAYLOAD_LIMIT = 10000000;
|
||||
export const enum ParserConstants {
|
||||
PAYLOAD_LIMIT = 10000000
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { IDisposable } from 'common/Types';
|
||||
import { IDcsHandler, IParams, IHandlerCollection, IDcsParser, DcsFallbackHandlerType, ISubParserStackState } from 'common/parser/Types';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { PAYLOAD_LIMIT } from 'common/parser/Constants';
|
||||
import { ParserConstants } from 'common/parser/Constants';
|
||||
|
||||
const EMPTY_HANDLERS: IDcsHandler[] = [];
|
||||
|
||||
@@ -138,7 +138,7 @@ EMPTY_PARAMS.addParam(0);
|
||||
* Note: The payload is currently limited to 50 MB (hardcoded).
|
||||
*/
|
||||
export class DcsHandler implements IDcsHandler {
|
||||
private static PAYLOAD_LIMIT = PAYLOAD_LIMIT;
|
||||
private static PAYLOAD_LIMIT = ParserConstants.PAYLOAD_LIMIT;
|
||||
|
||||
private _data = '';
|
||||
private _params: IParams = EMPTY_PARAMS;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { IOscHandler, IHandlerCollection, OscFallbackHandlerType, IOscParser, ISubParserStackState } from 'common/parser/Types';
|
||||
import { OscState, PAYLOAD_LIMIT } from 'common/parser/Constants';
|
||||
import { OscState, ParserConstants } from 'common/parser/Constants';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IDisposable } from 'common/Types';
|
||||
|
||||
@@ -192,7 +192,7 @@ export class OscParser implements IOscParser {
|
||||
* as OSC handlers.
|
||||
*/
|
||||
export class OscHandler implements IOscHandler {
|
||||
private static PAYLOAD_LIMIT = PAYLOAD_LIMIT;
|
||||
private static PAYLOAD_LIMIT = ParserConstants.PAYLOAD_LIMIT;
|
||||
|
||||
private _data = '';
|
||||
private _hitLimit: boolean = false;
|
||||
|
||||
Reference in New Issue
Block a user