File tree 2 files changed +3
-2
lines changed
src/main/kotlin/io/firetail/logging/servlet
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ class FiretailMapper {
22
22
.mapIndexed { _, value -> value to listOf (request.getHeader(value)) }
23
23
.toMap()
24
24
25
+ val body = request.inputStream.bufferedReader().use { it.readText() }
25
26
return FtRequest (
26
27
httpProtocol = request.protocol,
27
28
method = request.method,
28
29
headers = headers,
29
- body = request.inputStream.read().toString() ,
30
+ body = body ,
30
31
ip = request.remoteAddr,
31
32
resource = request.requestURI,
32
33
uri = request.requestURL.toString(), // FT calls the defines the URI as URL.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import java.io.PrintWriter
9
9
import java.util.function.Consumer
10
10
import org.springframework.web.util.ContentCachingResponseWrapper
11
11
12
- class SpringResponseWrapper (response : HttpServletResponse ? ) : ContentCachingResponseWrapper(response) {
12
+ class SpringResponseWrapper (response : HttpServletResponse ) : ContentCachingResponseWrapper(response) {
13
13
14
14
val allHeaders: Map <String , String >
15
15
get() {
You can’t perform that action at this time.
0 commit comments