|
21 | 21 | import java.net.SocketException; |
22 | 22 | import java.net.SocketTimeoutException; |
23 | 23 |
|
24 | | -import io.fusionauth.http.server.io.ConnectionClosedException; |
25 | 24 | import io.fusionauth.http.HTTPValues; |
26 | 25 | import io.fusionauth.http.HTTPValues.Connections; |
27 | 26 | import io.fusionauth.http.HTTPValues.Headers; |
28 | 27 | import io.fusionauth.http.HTTPValues.Protocols; |
29 | 28 | import io.fusionauth.http.ParseException; |
30 | | -import io.fusionauth.http.server.io.TooManyBytesToDrainException; |
31 | 29 | import io.fusionauth.http.io.PushbackInputStream; |
32 | 30 | import io.fusionauth.http.log.Logger; |
33 | 31 | import io.fusionauth.http.server.HTTPHandler; |
|
36 | 34 | import io.fusionauth.http.server.HTTPResponse; |
37 | 35 | import io.fusionauth.http.server.HTTPServerConfiguration; |
38 | 36 | import io.fusionauth.http.server.Instrumenter; |
| 37 | +import io.fusionauth.http.server.io.ConnectionClosedException; |
39 | 38 | import io.fusionauth.http.server.io.HTTPInputStream; |
40 | 39 | import io.fusionauth.http.server.io.HTTPOutputStream; |
41 | 40 | import io.fusionauth.http.server.io.Throughput; |
42 | 41 | import io.fusionauth.http.server.io.ThroughputInputStream; |
43 | 42 | import io.fusionauth.http.server.io.ThroughputOutputStream; |
| 43 | +import io.fusionauth.http.server.io.TooManyBytesToDrainException; |
44 | 44 | import io.fusionauth.http.util.HTTPTools; |
45 | 45 |
|
46 | 46 | /** |
@@ -80,7 +80,7 @@ public HTTPWorker(Socket socket, HTTPServerConfiguration configuration, Instrume |
80 | 80 | this.throughput = throughput; |
81 | 81 | this.buffers = new HTTPBuffers(configuration); |
82 | 82 | this.logger = configuration.getLoggerFactory().getLogger(HTTPWorker.class); |
83 | | - this.inputStream = new PushbackInputStream(new ThroughputInputStream(socket.getInputStream(), throughput)); |
| 83 | + this.inputStream = new PushbackInputStream(new ThroughputInputStream(socket.getInputStream(), throughput), instrumenter); |
84 | 84 | this.state = State.Read; |
85 | 85 | this.startInstant = System.currentTimeMillis(); |
86 | 86 | logger.trace("[{}] Starting HTTP worker.", Thread.currentThread().threadId()); |
@@ -123,7 +123,7 @@ public void run() { |
123 | 123 | // Not this line of code will block |
124 | 124 | // - When a client is using Keep-Alive - we will loop and block here while we wait for the client to send us bytes. |
125 | 125 | byte[] requestBuffer = buffers.requestBuffer(); |
126 | | - HTTPTools.parseRequestPreamble(inputStream, request, requestBuffer, instrumenter, () -> state = State.Read); |
| 126 | + HTTPTools.parseRequestPreamble(inputStream, request, requestBuffer, () -> state = State.Read); |
127 | 127 | if (logger.isTraceEnabled()) { |
128 | 128 | int availableBufferedBytes = inputStream.getAvailableBufferedBytesRemaining(); |
129 | 129 | if (availableBufferedBytes != 0) { |
|
0 commit comments