Skip to content

Commit 29e0fb4

Browse files
znzrybPushpavel
authored andcommitted
delete http 200 code reply
1 parent ee9773e commit 29e0fb4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/main/kotlin/com/github/pushpavel/autocp/gather/base/localServer.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import java.io.BufferedInputStream
1010
import java.io.ByteArrayOutputStream
1111
import java.io.InputStream
1212
import java.io.InputStreamReader
13-
import java.io.OutputStreamWriter
1413
import java.net.InetAddress
1514
import java.net.ServerSocket
1615
import java.net.SocketException
@@ -80,15 +79,6 @@ fun CoroutineScope.listenForMessageAsync(serverSocket: ServerSocket, timeout: In
8079
val inputStream = BufferedInputStream(it.getInputStream())
8180
val body = readHttpBody(inputStream)
8281

83-
// Competitive Companion doesn't need the response body, but responding avoids clients
84-
// keeping the connection open (which would make our old "read-until-EOF" logic hang).
85-
runCatching {
86-
OutputStreamWriter(it.getOutputStream(), Charsets.US_ASCII).use { writer ->
87-
writer.write("HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 0\r\n\r\n")
88-
writer.flush()
89-
}
90-
}
91-
9282
if (!body.isNullOrEmpty()) return@async body
9383
}
9484
return@async null

0 commit comments

Comments
 (0)