gerlowskija opened a new pull request, #2455: URL: https://github.com/apache/solr/pull/2455
https://issues.apache.org/jira/browse/SOLR-17044 # Description URL building logic in SolrJ is complex and is duplicated in several places. This leads to bugs and added maintenance effort. # Solution This PR consolidates much of the URL-building logic used by various SolrClient implementations into a single place (`ClientUtils.buildRequestUrl(...)`) that can be consumed by _all_ "http" implementations. It builds on some nicely organized logic in HttpSolrClientBase, making only a few small tweaks (e.g. converting to a 'public static' method to broader availability). One substantive change worth pointing out is that with this change HttpSolrClient now obeys `SolrRequest.getBasePath(..)`, bringing it into line with `Http2SolrClient` and `HttpJdkSolrClient`. I'd rather `getBasePath`/`setBasePath` not exist entirely - I mostly agree with some thoughts that David Smiley summed up on SOLR-17256. But while it exists, it probably makes sense to make similar clients (e.g. all the "http" clients) as uniform as possible in obeying or ignoring it. # Tests Existing tests continue to pass. I still need to write some unit tests for `ClientUtils.buildRequestUrl` before moving this out of 'Draft'. # 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) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [ ] I have added tests for my changes. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org