MCPcopy Create free account
hub / github.com/apache/tomcat / readToken

Method readToken

java/org/apache/tomcat/util/http/parser/Cookie.java:226–238  ·  view source on GitHub ↗
(ByteBuffer bb)

Source from the content-addressed store, hash-verified

224
225
226 private static ByteBuffer readToken(ByteBuffer bb) {
227 final int start = bb.position();
228 int end = bb.limit();
229 while (bb.hasRemaining()) {
230 if (!HttpParser.isToken(bb.get())) {
231 end = bb.position() - 1;
232 bb.position(end);
233 break;
234 }
235 }
236
237 return new ByteBuffer(bb.bytes, start, end - start);
238 }
239
240
241 private static void logInvalidHeader(int start, ByteBuffer bb) {

Callers 1

parseCookieMethod · 0.95

Calls 5

isTokenMethod · 0.95
positionMethod · 0.80
hasRemainingMethod · 0.80
getMethod · 0.65
limitMethod · 0.45

Tested by

no test coverage detected