Skip to content

Commit

Permalink
Reduce useless HTTP 2 status's String allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 authored and vietj committed Jan 16, 2024
1 parent 496a905 commit 67ba713
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private boolean checkSendHeaders(boolean end, boolean checkFlush) {
}

private void prepareHeaders() {
headers.status(Integer.toString(status.code())); // Could be optimized for usual case ?
headers.status(status.codeAsText()); // Could be optimized for usual case ?
if (contentEncoding != null && headers.get(HttpHeaderNames.CONTENT_ENCODING) == null) {
headers.set(HttpHeaderNames.CONTENT_ENCODING, contentEncoding);
}
Expand Down

0 comments on commit 67ba713

Please sign in to comment.