public void parse(Buf buf, RapidoidHelper helper) { Bytes bytes = buf.bytes(); BufRange protocol = helper.protocol; BufRanges headers = helper.headers; buf.scanUntil(SPACE, helper.verb); buf.scanUntil(SPACE, helper.uri); buf.scanLn(protocol); helper.isKeepAlive.value = detectKeepAlive(buf, helper, bytes, protocol, headers); BytesUtil.split(bytes, helper.uri, ASTERISK, helper.path, helper.query, false); helper.isGet.value = BytesUtil.matches(bytes, helper.verb, GET, true); if (!helper.isGet.value) { parseBody(buf, helper); } }
public void parse(Buf buf, RapidoidHelper helper) { Bytes bytes = buf.bytes(); BufRange protocol = helper.protocol; BufRanges headers = helper.headers; buf.scanUntil(SPACE, helper.verb); buf.scanUntil(SPACE, helper.uri); buf.scanLn(protocol); helper.isKeepAlive.value = detectKeepAlive(buf, helper, bytes, protocol, headers); BytesUtil.split(bytes, helper.uri, ASTERISK, helper.path, helper.query, false); helper.isGet.value = BytesUtil.matches(bytes, helper.verb, GET, true); if (!helper.isGet.value) { parseBody(buf, helper); } }