Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
If a client sends a HTTP POST request with header Expect: 100-continue the normal flow is for Solr (Jetty) to first respond with a HTTP 100 continue response, then the client will send the body which will be processed and then a final response is sent by Solr.
However, if such a request leads to an error (e.g. 404 or 401), then Solr will skip the 100 response and instead send the error response directly. The very last ation of SolrDispatchFilter#doFilter is to call consumeInputFully(). However, this should not be done in case an error response has already been sent, else you'll provoke an exception in Jetty's HTTP lib:
2020-02-07 23:13:26.459 INFO (qtp403547747-24) [ ] o.a.s.s.SolrDispatchFilter Could not consume full client request => java.io.IOException: Committed before 100 Continues at org.eclipse.jetty.http2.server.HttpChannelOverHTTP2.continue100(HttpChannelOverHTTP2.java:362) java.io.IOException: Committed before 100 Continues at org.eclipse.jetty.http2.server.HttpChannelOverHTTP2.continue100(HttpChannelOverHTTP2.java:362) ~[http2-server-9.4.19.v20190610.jar:9.4.19.v20190610] at org.eclipse.jetty.server.Request.getInputStream(Request.java:872) ~[jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610] at javax.servlet.ServletRequestWrapper.getInputStream(ServletRequestWrapper.java:185) ~[javax.servlet-api-3.1.0.jar:3.1.0] at org.apache.solr.servlet.SolrDispatchFilter$1.getInputStream(SolrDispatchFilter.java:612) ~[solr-core-8.4.1.jar:8.4.1 832bf13dd9187095831caf69783179d41059d013 - ishan - 2020-01-10 13:40:28] at org.apache.solr.servlet.SolrDispatchFilter.consumeInputFully(SolrDispatchFilter.java:454) ~[solr-core-8.4.1.jar:8.4.1 832bf13dd9187095831caf69783179d41059d013 - ishan - 2020-01-10 13:40:28] at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:445) ~[solr-core-8.4.1.jar:8.4.1 832bf13dd9187095831caf69783179d41059d013 - ishan - 2020-01-10 13:40:28]
Attachments
Issue Links
- is related to
-
SOLR-14249 Krb5HttpClientBuilder should not buffer requests
- Open
- links to