(ByteBuffer bb)
| 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) { |
no test coverage detected