You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2020/02/11 09:32:00 UTC

[jira] [Commented] (SOLR-14250) Solr tries to read request body after error response is sent

    [ https://issues.apache.org/jira/browse/SOLR-14250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034292#comment-17034292 ] 

Jan Høydahl commented on SOLR-14250:
------------------------------------

Please see [GitHub Pull Request #1250|https://github.com/apache/lucene-solr/pull/1250] for a simple log-only fix which do *not* INFO-log the ugly stacktrace in this special legitimate case.

> 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
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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}
> 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]
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org