Skip to content

Commit f2d18ce

Browse files
franz1981vietj
authored andcommitted
Reduce useless HTTP 2 status's String allocation
1 parent 8b836ac commit f2d18ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/vertx/core/http/impl/Http2ServerResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ private boolean checkSendHeaders(boolean end, boolean checkFlush) {
515515
}
516516

517517
private void prepareHeaders() {
518-
headers.status(Integer.toString(status.code())); // Could be optimized for usual case ?
518+
headers.status(status.codeAsText()); // Could be optimized for usual case ?
519519
if (contentEncoding != null && headers.get(HttpHeaderNames.CONTENT_ENCODING) == null) {
520520
headers.set(HttpHeaderNames.CONTENT_ENCODING, contentEncoding);
521521
}

0 commit comments

Comments
 (0)