src/format/nginx.js
/**
 * Parse a HTTP request header line.
 */
Parse a HTTP request header line.
Parse a HTTP request header line .
function parseRequest(request) {
  const res = /([^ ]+)\s+([^ ]+)\s+([^ ]+)/.exec(request);
  if (!res) {
    return Map({});
  }
  return Map({ method: res[1], url: res[2], protocol: res[3] });
}
function parseRequest ( request ) { const res = / ([^ ]+)\s+([^ ]+)\s+([^ ]+) / . exec ( request ) ; if ( ! res ) { return Map ( { } ) ; } return Map ( { method : res [ 1 ] , url : res [ 2 ] , protocol : res [ 3 ] } ) ; }
Parse a HTTP request header line.
Parse a HTTP request header line .
// throw new Error(`Could not parse request: '${request}'.`)