janhoy commented on code in PR #2778:
URL: https://github.com/apache/solr/pull/2778#discussion_r1806175920
##########
solr/core/src/java/org/apache/solr/cli/PostTool.java:
##########
@@ -315,8 +315,7 @@ public void runImpl(CommandLine cli) throws Exception {
throw new IllegalArgumentException(
"Must specify -c / --name parameter with --solr-url to post
documents.");
}
- String url =
- SolrCLI.normalizeSolrUrl(cli) + "/solr/" +
cli.getOptionValue("name") + "/update";
+ String url = SolrCLI.normalizeSolrUrl(cli) + "/" +
cli.getOptionValue("name") + "/update";
Review Comment:
Cannot always blindly add `/solr`. The tests use randomized `contextPath`
which may be `/xy/zx/` for a running Jetty, and then the test will pass in a
`--solr-url` such as `http://localhost:9999/xy/zx/`, and the normalization will
then return the same path which is correct. Question is whether the
`normalizeSolrUrl` command should append `/solr` if no context path is given at
all, the same way that `SolrCLI.getSolrClient(cli)` does.
--
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]