dsmiley commented on PR #4640: URL: https://github.com/apache/solr/pull/4640#issuecomment-5686825922
Ugh; should not have merged: ---- The integration test failure ([job](https://github.com/apache/solr/actions/runs/34974725157/job/104401142043?pr=4640)) isn't flaky; it's caused by this PR. **What failed:** `test_ssl.bats:124` ("use different hostname when not checking peer-name"). With `solr.jetty.ssl.sni.host.check.enabled=true`, the test runs `solr api` against `https://localhost`. Jetty rejects that with HTTP **400** "Invalid SNI". The test expects `solr api` to exit nonzero, but it exited 0. **Why:** `ApiTool.callGet` changed from `JsonMapResponseParser` to `InputStreamResponseParser("json")`. In `HttpSolrClient.processErrorsAndResponse`: - A 400 status doesn't throw by itself. - The old parser declared `application/json`, so Jetty's HTML error page failed `checkContentType`, which threw `RemoteSolrException` with the body ("Invalid SNI"). The CLI then exited nonzero. - `InputStreamResponseParser.getContentTypes()` returns `Set.of()` ("don't enforce"), and `wantStream()` returns the raw stream. The HTML error page comes back as normal output and the exit code is 0. The earlier peer-name check (line 116) still passes because that one fails during the TLS handshake, before any HTTP response exists. **Possible fix:** in `ApiTool`, read the `responseStatus` from the NamedList that `createInputStreamNamedList(httpStatus, is)` returns, and throw if it isn't 2xx. That keeps the raw pass-through and still fails on error responses. It's also worth checking whether other `InputStreamResponseParser` callers in this PR (e.g. `PackageUtils`) now let 400s through silently. -- 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]
