B2G/gecko/services/common/modules-testing/bagheeraserver.js
/**
   * Handles requests to /submit/*.
   */
Handles requests to /submit.
Handles requests to / submit .
function _handleV1Submit(request, response, rest) {
    if (!rest.length) {
      throw HTTP_404;
    }
    let namespace;
    let index = rest.indexOf("/");
    if (index == -1) {
      namespace = rest;
      rest = "";
    } else {
      namespace = rest.substr(0, index);
      rest = rest.substr(index + 1);
    }
    this._handleNamespaceSubmit(namespace, rest, request, response);
  }
function _handleV1Submit ( request , response , rest ) { if ( ! rest . length ) { throw HTTP_404 ; } let namespace ; let index = rest . indexOf ( "/" ) ; if ( index == - 1 ) { namespace = rest ; rest = "" ; } else { namespace = rest . substr ( 0 , index ) ; rest = rest . substr ( index + 1 ) ; } this . _handleNamespaceSubmit ( namespace , rest , request , response ) ; }
Handles requests to /submit/*.
Handles requests to / submit / * .