serhiy-bzhezytskyy opened a new pull request, #4914: URL: https://github.com/apache/solr/pull/4914
Follow-up to #4640, which introduced this: https://github.com/apache/solr/pull/4640#issuecomment-5686825922 `InputStreamResponseParser.getContentTypes()` returns an empty set, so `HttpSolrClient` never enforces a content type and never rejects a non-2xx status for a request using it. #4640 switched `ApiTool.callGet` and `PackageUtils.getJsonStringFromUrl` from `JsonMapResponseParser` (which threw on an HTML error page's content-type mismatch) to `InputStreamResponseParser` for the raw pass-through, so a 400/500 response is now printed as if it had succeeded. **Fix:** both callers now read the `responseStatus` the parser already puts in the `NamedList` and throw `SolrServerException` if it isn't 2xx, with the response body in the message. Raw pass-through is unchanged for successful responses. **Verification:** `./gradlew integrationTests --tests test_ssl.bats` -- 7/7 ok, including "use different hostname when not checking peer-name", the test that caught this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
