Skip to content

Commit 6aa1704

Browse files
committed
fix(ort-utils): Read the request body before responding
This is part of a `SocketTimeoutException` fix when running with Java 25 and aligns with [1]. [1]: https://github.com/oss-review-toolkit/ort/blob/b855fe74b32c14c2cf3a3a3943ab61e2dc17a125/utils/ort/src/funTest/kotlin/storage/S3FileStorageFunTest.kt#L61-L62 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.io>
1 parent 0211d1d commit 6aa1704

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/ort/src/funTest/kotlin/storage/HttpFileStorageFunTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class HttpFileStorageFunTest : WordSpec() {
4545
override fun handle(exchange: HttpExchange) {
4646
when (exchange.requestMethod) {
4747
"PUT" -> {
48-
exchange.sendResponseHeaders(HttpURLConnection.HTTP_CREATED, 0)
4948
requests[exchange.requestURI.toString()] = exchange.requestBody.reader().use { it.readText() }
49+
exchange.sendResponseHeaders(HttpURLConnection.HTTP_CREATED, 0)
5050
}
5151

5252
"GET" -> {

0 commit comments

Comments
 (0)