Browse Source

Add trailing newline to response body

master
kageru 2 months ago
parent
commit
7c0ac15022
Signed by: kageru GPG Key ID: 8282A2BEA4ADA3D2
1 changed files with 2 additions and 2 deletions
  1. 4
      src/main/kotlin/moe/kageru/kodeshare/Routes.kt

4
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")
}
}
Loading…
Cancel
Save