gerlowskija opened a new pull request, #4799: URL: https://github.com/apache/solr/pull/4799
https://issues.apache.org/jira/browse/SOLR-XXXXX # Description SOLR-18332 aims to reduce the usages of "qt" across our codebase. Its usage complicates our code (by making the path of an HTTP "untrustworthy" for determining what code an API call actually triggers) and complicates security. One place where "QT" is very commonly used is in Solr's streaming expressions code. Much of this is attributable to the SolrStream class and its cousins, which send HTTP requests but don't offer any way for callers to specify the HTTP path (without smuggling a "QT" parameter into the SolrParams object they consume). # Solution This PR resolves this problem by adding two new constructors to SolrStream that take in an explicit "path" parameter, and then replacing many QT usage sites with usage of the new, path-aware, constructor. In the process we also shift some of the SolrStream usage away from using string-concatenation and "coreUrls", in favor of explicit (and separate) base URL and core-name parameters. # Tests This code is a refactor and doesn't modify any behavior or introduce any truly "new" code. So validation consists of existing tests (particular streaming-related ones) continuing to pass. # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability. - [x] I have created a Jira issue and added the issue ID to my pull request title. - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. -- 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]
