parses the request line. Returns true if completed successfully, false if needs input
438201
protected final boolean parseResponseLine(ByteBuffer in) throws BaseExceptions.InvalidState, BaseExceptions.BadMessage {
        try {
            lineLoop: while(true) {
                char ch;
                switch (_requestLineState) {
                    case START:
                        _requestLineState = RequestLineState.VERSION;
                        resetLimit(maxResponseLineSize);

                    case VERSION:
                        for(ch = next(in, false); ch != HttpTokens.SPACE && ch != HttpTokens.TAB; ch = next(in, false)) {
                            if (ch == HttpTokens.EMPTY_BUFF) return false;
                            putChar(ch);
                        }

                        _majorVersion = 1;
                        _minorVersion = 1;

                        if (arrayMatches(HTTP11Bytes) || arrayMatches(BodyAndHeaderParser.HTTPS11Bytes)) {
                            _majorVersion = 1;
                            _minorVersion = 1;
                        }
                        else if (arrayMatches(HTTP10Bytes) || arrayMatches(HTTPS10Bytes)) {
                            _majorVersion = 1;
                            _minorVersion = 0;
                        }
                        else {
                            String reason =  "Bad HTTP version: " + getString();
                            clearBuffer();
                            shutdownParser();
                            throw new BadMessage(reason);
                        }

                        _lineScheme = getString(bufferPosition() - 4);
                        clearBuffer();

                        // We are through parsing the request line
                        _requestLineState = RequestLineState.SPACE1;

                    case SPACE1:
                        // Eat whitespace
                        for(ch = next(in, false); ch == HttpTokens.SPACE || ch == HttpTokens.TAB; ch = next(in, false));

                        if (ch == HttpTokens.EMPTY_BUFF) return false;

                        if (!HttpTokens.isDigit(ch)) {
                            shutdownParser();
                            throw new BadMessage("Received invalid token when needed code: '" + (char)ch + "'");
                        }
                        _statusCode = 10*_statusCode + (ch - HttpTokens.ZERO);
                        _requestLineState = RequestLineState.STATUS_CODE;

                    case STATUS_CODE:
                        for(ch = next(in, false); HttpTokens.isDigit(ch); ch = next(in, false)) {
                            _statusCode = 10*_statusCode + (ch - HttpTokens.ZERO);
                        }

                        if (ch == HttpTokens.EMPTY_BUFF) return false;  // Need more data

                        if (_statusCode < 100 || _statusCode >= 600) {
                            shutdownParser();
                            throw new BadMessage("Invalid status code '" +
                                    _statusCode + "'. Must be between 100 and 599");
                        }

                        if (ch == HttpTokens.LF) {
                        	endResponseLineParsing("");
                            return true;
                        }

                        if (!HttpTokens.isWhiteSpace(ch)) {
                            shutdownParser();
                            throw new BadMessage("Invalid request: Expected SPACE but found '" + (char)ch + "'");
                        }

                        _requestLineState = RequestLineState.SPACE2;

                    case SPACE2:
                        // Eat whitespace
                        for(ch = next(in, false); ch == HttpTokens.SPACE || ch == HttpTokens.TAB; ch = next(in, false));

                        if (ch == HttpTokens.EMPTY_BUFF) return false;

                        if (ch == HttpTokens.LF) {
                        	endResponseLineParsing("");
                            return true;
                        }

                        putChar(ch);
                        _requestLineState = RequestLineState.REASON;

                    case REASON:
                        for(ch = next(in, false); ch != HttpTokens.LF; ch = next(in, false)) {
                            if (ch == HttpTokens.EMPTY_BUFF) return false;
                            putChar(ch);
                        }



                        String reason = getTrimmedString();
                        endResponseLineParsing(reason);
                        return true;

                    default:
                        throw new BaseExceptions.InvalidState("Attempted to parse Response line when already complete." +
                                "RequestLineState: '" + _requestLineState + "'");
                }    // switch
            }        // while loop
        } catch (BaseExceptions.BadMessage ex) {
            shutdownParser();
            throw ex;
        }
    }
1150707
protected void parse()
	throws IOException {

	String line;
	line = _reader.readLine();
	if (logger.isTraceEnabled()) {
	    logger.trace(line);
	}
	parseHead(line);

	while ( (line = _reader.readLine()).length() != 0 ) {
	    if (logger.isTraceEnabled()) {
		logger.trace(line);
	    }

	    if (line.startsWith(HTTPProtocol.CONNECTION)) {
		_connection = getRest(line, HTTPProtocol.CONNECTION.length());
	    } else if (line.startsWith(HTTPProtocol.SERVER)) {
		_server = getRest(line, HTTPProtocol.SERVER.length());
	    } else if (line.startsWith(HTTPProtocol.CONTENT_TYPE)) {
		_contentType = getRest(line, HTTPProtocol.CONTENT_TYPE.length());
	    } else if (line.startsWith(HTTPProtocol.CONTENT_LENGTH)) {
		_contentLength = Long.parseLong(getRest(line,
							HTTPProtocol.CONTENT_LENGTH.length()));
	    } else if (line.startsWith(HTTPProtocol.HOST)){
		_host = getRest(line, HTTPProtocol.HOST.length());
	    } else if (line.startsWith(HTTPProtocol.CHUNKED)) {
		_chunked = true;
	    }

	}
    }
1205516
def _parse_line(line=''):
    '''
    
    '''
    parts = line.split()
    key = parts.pop(0)
    value = ' '.join(parts)
    return key, value
308504
public function parseRequest()
	{
		$this->request = Input::all();

		$uri = Route::getCurrentRoute()->parametersWithoutNulls();

		if($uri)
		{
			$this->request = array_merge($uri, $this->request);
		}

		$this->setApiContext();
	}
1072557
def parse_check_lines(server, lines)
      raise(ArgumentError, 'arg server not of type Server') if !server.is_a? Server
      lines.each do |l|
        key, value = l.gsub("\t","").split(": ")
        case key.chomp
        when "ssh"
          server.ssh_check_ok = value =~ /OK/ ? true : false
        when "PostgreSQL"
          server.pg_conn_ok = value == "OK" ? true : false
        end
      end
    end
430058
def parse_request(request, input_schema, raw):
    """"""

    request.json = {}
    if not raw:
        body = yield from request.read()
        if body:
            try:
                request.json = json.loads(body.decode('utf-8'))
            except ValueError as e:
                request.json = {"malformed_json": body.decode('utf-8')}
                raise aiohttp.web.HTTPBadRequest(text="Invalid JSON {}".format(e))

    # Parse the query string
    if len(request.query_string) > 0:
        for (k, v) in urllib.parse.parse_qs(request.query_string).items():
            request.json[k] = v[0]

    if input_schema:
        try:
            jsonschema.validate(request.json, input_schema)
        except jsonschema.ValidationError as e:
            log.error("Invalid input query. JSON schema error: {}".format(e.message))
            raise aiohttp.web.HTTPBadRequest(text="Invalid JSON: {} in schema: {}".format(
                e.message,
                json.dumps(e.schema)))

    return request
519539
protected function parse_request(){
		if (isset($_GET['action'])){
			$action = $_GET['action'];
			//simple request mode
			if ($action == "get"){
				//data request
				if (isset($_GET['id'])){
					//single entity data request
					$this->request->set_filter($this->config->id["name"],$_GET['id'],"=");
				} else {
					//loading collection of items
				}
			} else {
				//data saving
				$this->editing = true;
			}
			parent::check_csrf();
		} else {
			if (isset($_GET['editing']) && isset($_POST['ids']))
				$this->editing = true;			
			parent::parse_request();
		}
	
		if (isset($_GET["start"]) && isset($_GET["count"]))
			$this->request->set_limit($_GET["start"],$_GET["count"]);

	}
1021442
def match_for(line, request, &warning_handler)
      if match_info = matches(line, &warning_handler)
        convert_captured_values(match_info[:captures], request)
      else
        false
      end
    end
1049614
def _parse_request(self):
        '''
        
        '''
        self.req_method = 'unknown'
        self.req_params = {}
        self.req_rpc_version = '2.0'
        self.req_id = 0
        self.data = self.rfile.read(int(self.headers.get('content-length')))
        data_dict = json.loads(self.data)
        self.req_method = data_dict['method']
        self.req_params = decode_data(data_dict['params'])
        self.req_rpc_version = data_dict['jsonrpc']
        self.req_id = data_dict['id']
659171
function parse(line) {
  assert_str(line)

  return Either.either(pipe, noop, Right(line).chain(is_inlined).chain(is_native).chain(is_not_inlined))
}
1183196
def parse(self):
        

        if self.data is None:
            raise ValueError('No input data provided, unable to parse')

        for line in self.data:
            parts = line.strip().split()
            try:
                path = parts[0]
                code = parts[1]
                path, line, char = path.split(':')[:3]

                if not re.match(POSITION, line):
                    continue
                if not re.match(POSITION, char):
                    continue
                if not re.match(ERROR_CODE, code):
                    continue
                if not re.match(FILEPATH, path):
                    continue

            # For parts mismatch
            except IndexError:
                continue
            # For unpack mismatch
            except ValueError:
                continue

            yield path, code, line, char, ' '.join(parts[2:])
451094
function parse_request(){
		parent::parse_request();

		if (isset($_GET["posStart"]) && isset($_GET["count"]))
			$this->request->set_limit($_GET["posStart"],$_GET["count"]);
	}
245650
def parse(post)
      @raw = post.to_s
      for line in @raw.split('&')
        key, value = *line.scan( %r{^([A-Za-z0-9_.]+)\=(.*)$} ).flatten
        params[key] = CGI.unescape(value)
      end
    end
556536
def parse_line(self, line: str) -> None:
        
        if line[0].isspace():
            # continuation of a multi-line header
            if self._last_key is None:
                raise HTTPInputError("first header line cannot start with whitespace")
            new_part = " " + line.lstrip()
            self._as_list[self._last_key][-1] += new_part
            self._dict[self._last_key] += new_part
        else:
            try:
                name, value = line.split(":", 1)
            except ValueError:
                raise HTTPInputError("no colon in header line")
            self.add(name, value.strip())
86443
def parse(self, input):
        """"""
        query = None
        for handler in self._line_handlers:
            try:
                query = handler.handle(input)
            except Exception as e:
                query = None
            finally:
                if query is not None:
                    return query
        return None
418054
def parse(self, line, **options):
        
        line = line.strip()
        if not line:
            return (False, (), {})
        split = line.split()
        cmd, args = split[0], split[1:]
        return (cmd, args, {})
897710
function parseSimpleInline(parse, content, state) {
  const isCurrentlyInline = state.inline || false;
  const isCurrentlySimple = state.simple || false;
  state.inline = false;
  state.simple = true;
  const result = parse(content, state);
  state.inline = isCurrentlyInline;
  state.simple = isCurrentlySimple;
  return result;
}