src/common/incomingParser.js
function HTTPParser(channelContext, context) {
  _classCallCheck(this, HTTPParser);
  if (channelContext) {
    this._channelContext = channelContext;
    channelContext[SERVER.Capabilities][HTTP.CAPABILITY].incoming = [];
    channelContext[SERVER.Capabilities][HTTP.CAPABILITY].currentIncoming = null;
  }

  this.context = context || this._createNewRequest();
  this.context[HTTP.SkipBody] = false;
  this.context[HTTP.ShouldKeepAlive] = true;
  this.context[IOPA.Trailers] = [];

  this._state = 'HTTP_LINE';
  this._upgrade = false;
  this._line = '';
  this._isChunked = false;
  this._connection = '';
  this._headerSize = 0;
  this._contentLength = null;

  //  this._currentChunk;
  //  this._offset;
  //  this._end;
}
function HTTPParser(channelContext, context) {
  _classCallCheck(this, HTTPParser);
  if (channelContext) {
    this._channelContext = channelContext;
    channelContext[SERVER.Capabilities][HTTP.CAPABILITY].incoming = [];
    channelContext[SERVER.Capabilities][HTTP.CAPABILITY].currentIncoming = null;
  }

  this.context = context || this._createNewRequest();
  this.context[HTTP.SkipBody] = false;
  this.context[HTTP.ShouldKeepAlive] = true;
  this.context[IOPA.Trailers] = [];

  this._state = 'HTTP_LINE';
  this._upgrade = false;
  this._line = '';
  this._isChunked = false;
  this._connection = '';
  this._headerSize = 0;
  this._contentLength = null;

  //  this._currentChunk;
  //  this._offset;
  //  this._end;
}
function HTTPParser ( channelContext , context ) { _classCallCheck ( this , HTTPParser ) ; if ( channelContext ) { this . _channelContext = channelContext ; channelContext [ SERVER . Capabilities ] [ HTTP . CAPABILITY ] . incoming = [ ] ; channelContext [ SERVER . Capabilities ] [ HTTP . CAPABILITY ] . currentIncoming = null ; } this . context = context || this . _createNewRequest ( ) ; this . context [ HTTP . SkipBody ] = false ; this . context [ HTTP . ShouldKeepAlive ] = true ; this . context [ IOPA . Trailers ] = [ ] ; this . _state = 'HTTP_LINE' ; this . _upgrade = false ; this . _line = '' ; this . _isChunked = false ; this . _connection = '' ; this . _headerSize = 0 ; this . _contentLength = null ; //  this._currentChunk; //  this._offset; //  this._end; }
IOPA HTTPParser converts inbound HTTP requests and inbound HTTP responses into IOPA Request and Response contexts

@class HTTPParser
@param channelContext (required) the transport context on which to parse the SERVER.RawStream message stream for one or more requests/responses;  typically TCP or UDP
@param context (optional) the IOPA Context on which to add the IOPA fields;  if blank new one(s) are created; optimization for non-session-oriented protocols such as UDP
@event IOPA.EVENTS.Request on channelContext[IOPA.Events]
@event IOPA.EVENTS.Response on channelContext[IOPA.Events]
@constructor
@public
IOPA HTTPParser converts inbound HTTP requests and inbound HTTP responses into IOPA Request and Response contexts