dsmiley commented on code in PR #4574:
URL: https://github.com/apache/solr/pull/4574#discussion_r3506550580
##########
solr/core/src/java/org/apache/solr/jersey/container/JettyBridgeResponseWriter.java:
##########
@@ -58,10 +59,13 @@ public OutputStream writeResponseStatusAndHeaders(
final StatusType statusInfo = context.getStatusInfo();
httpServletResponse.setStatus(statusInfo.getStatusCode());
- if (contentLength != -1 && contentLength < Integer.MAX_VALUE) {
- httpServletResponse.setContentLength((int) contentLength);
- }
+ // Don't set Content-Length: Solr's QueryResponseWriters stream and can't
predict the exact
+ // length, so a declared value may undercount and Jetty 12.1 aborts with
"too much content
+ // written". Leaving it unset frames the response as chunked, as the v1
path already does.
Review Comment:
I may dig deeper hands-on... loss of Content-Length is sad and _should_ be
something that can be fixed as long as Solr isn't manipulating the response.
Anything else is just excuses.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]