Add trailing newline to response body

This commit is contained in:
kageru 2020-10-28 12:23:21 +01:00
parent 726a25bed7
commit 7c0ac15022
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -121,7 +121,7 @@ object Routes {
// while also redirecting browser uploads to the newly created paste. // 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. // May seem odd to return code 302, but it seems to be the only way.
response.headers.append(HttpHeaders.Location, uri) 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 return uri
} }
@ -134,7 +134,7 @@ object Routes {
} else { } else {
respond(HttpStatusCode.OK, PastePage.build(paste.content, paste.uri, ext)) 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")
} }
} }