MCPcopy Create free account
hub / github.com/jetlang/remoting / HeaderLine

Class HeaderLine

src/main/java/org/jetlang/web/HeaderReader.java:94–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 public class HeaderLine implements NioReader.State {
95
96 private final HttpRequest headers;
97 int eol;
98
99 public HeaderLine(HttpRequest headers) {
100 this.headers = headers;
101 }
102
103 @Override
104 public NioReader.State processBytes(ByteBuffer buffer) {
105 int stripped = stripEndOfLines(buffer);
106 eol += stripped;
107 if (eol == 4) {
108 if (headers.contentLength == 0) {
109 return dispatchHttpRequest(headers);
110 } else {
111 return new ContentReader(headers);
112 }
113 }
114 if (buffer.hasRemaining() && eol == 2) {
115 return new ReadHeader(headers);
116 }
117 return null;
118 }
119 }
120
121 private class ContentReader implements NioReader.State {
122

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…