From 7c0ac15022e844698f6ec931896bd94301d7450c Mon Sep 17 00:00:00 2001 From: kageru Date: Wed, 28 Oct 2020 12:23:21 +0100 Subject: [PATCH] Add trailing newline to response body --- src/main/kotlin/moe/kageru/kodeshare/Routes.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/moe/kageru/kodeshare/Routes.kt b/src/main/kotlin/moe/kageru/kodeshare/Routes.kt index 51a6e97..1bac0dc 100644 --- a/src/main/kotlin/moe/kageru/kodeshare/Routes.kt +++ b/src/main/kotlin/moe/kageru/kodeshare/Routes.kt @@ -121,7 +121,7 @@ object Routes { // while also redirecting browser uploads to the newly created paste. // May seem odd to return code 302, but it seems to be the only way. response.headers.append(HttpHeaders.Location, uri) - respond(HttpStatusCode.Found, "${config[ServerSpec.pasteurl].ifBlank { config[ServerSpec.domain] }}$uri") + respond(HttpStatusCode.Found, "${config[ServerSpec.pasteurl].ifBlank { config[ServerSpec.domain] }}$uri\n") return uri } @@ -134,7 +134,7 @@ object Routes { } else { respond(HttpStatusCode.OK, PastePage.build(paste.content, paste.uri, ext)) } - } ?: respond(HttpStatusCode.NotFound, "nothing found for id $uri") + } ?: respond(HttpStatusCode.NotFound, "nothing found for id $uri\n") } }