Skip to content

Commit

Permalink
#173 Set Content-Type for response payload containing text only
Browse files Browse the repository at this point in the history
  • Loading branch information
mcweba committed May 2, 2024
1 parent 330952f commit 8ba246d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ private void respondWith(HttpServerResponse response, StatusCode statusCode, Str
response.setStatusCode(statusCode.getStatusCode());
response.setStatusMessage(statusCode.getStatusMessage());
if (responseBody != null) {
response.putHeader(CONTENT_TYPE.getName(), "text/plain");
response.end(responseBody);
} else {
response.end();
Expand Down

0 comments on commit 8ba246d

Please sign in to comment.