Jan Høydahl created SOLR-14250:
----------------------------------
Summary: Solr tries to read request body after error response is
sent
Key: SOLR-14250
URL: https://issues.apache.org/jira/browse/SOLR-14250
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Jan Høydahl
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:
{noformat}
solr1_1 | 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 Continuessolr1_1 | 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
Continuessolr1_1 | at
org.eclipse.jetty.http2.server.HttpChannelOverHTTP2.continue100(HttpChannelOverHTTP2.java:362)solr1_1
| java.io.IOException: Committed before 100 Continuessolr1_1 | at
org.eclipse.jetty.http2.server.HttpChannelOverHTTP2.continue100(HttpChannelOverHTTP2.java:362)
~[http2-server-9.4.19.v20190610.jar:9.4.19.v20190610]solr1_1 | at
org.eclipse.jetty.server.Request.getInputStream(Request.java:872)
~[jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]solr1_1 | at
javax.servlet.ServletRequestWrapper.getInputStream(ServletRequestWrapper.java:185)
~[javax.servlet-api-3.1.0.jar:3.1.0]solr1_1 | 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]solr1_1 | 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]solr1_1 | 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] {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]