chengyouling commented on code in PR #4875:
URL:
https://github.com/apache/servicecomb-java-chassis/pull/4875#discussion_r2255766252
##########
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/HttpServletResponseEx.java:
##########
@@ -48,4 +48,8 @@ default Flowable<Buffer> getFlowableBuffer() {
}
void endResponse() throws IOException;
+
+ default void setChunkedForEvent(boolean chunked) {
+ // not set header transfer-encoding=chunked in Rest Over Servlet, or will
have Multiple in response.
+ }
Review Comment:
add checked in setChunked method still have multiple headers of
HttpServletResponseEx, because there header is null, so I think it's better to
keep using setChunkedForEvent method to avoid affecting other abilities, code
like this:
default void setChunked(boolean chunked) {
if (getHeader(HttpHeaders.TRANSFER_ENCODING.toString()) != null) {
return;
}
setHeader(HttpHeaders.TRANSFER_ENCODING.toString(),
HttpHeaders.CHUNKED.toString());
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]