Format Http.kt

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent e5fc516ef1
commit 21cf2526c5
  1. 12
      game/src/main/kotlin/org/openrs2/game/net/http/Http.kt

@ -46,11 +46,13 @@ public object Http {
val keepAlive = isKeepAlive(request, version) val keepAlive = isKeepAlive(request, version)
val response = DefaultHttpResponse(version, status) val response = DefaultHttpResponse(version, status)
response.headers().add(HttpHeaderNames.CONNECTION, if (keepAlive) { response.headers().add(
HttpHeaderValues.KEEP_ALIVE HttpHeaderNames.CONNECTION, if (keepAlive) {
} else { HttpHeaderValues.KEEP_ALIVE
HttpHeaderValues.CLOSE } else {
}) HttpHeaderValues.CLOSE
}
)
response.headers().add(HttpHeaderNames.SERVER, BANNER) response.headers().add(HttpHeaderNames.SERVER, BANNER)
response.headers().add(HttpHeaderNames.CONTENT_TYPE, contentType) response.headers().add(HttpHeaderNames.CONTENT_TYPE, contentType)
response.headers().add(HttpHeaderNames.CONTENT_LENGTH, contentLength) response.headers().add(HttpHeaderNames.CONTENT_LENGTH, contentLength)

Loading…
Cancel
Save