diff --git a/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml b/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml new file mode 100644 index 00000000000..d4f29e24bf0 --- /dev/null +++ b/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml @@ -0,0 +1,10 @@ +title: > + Distributed tracing and audit logging now see request parameters sent in a url-encoded POST body, + not only those in the URL query string. +type: changed +authors: + - name: David Smiley + - name: Xinyao Zhang +links: + - name: PR#4870 + url: https://github.com/apache/solr/pull/4870 diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java index 3d80367921f..cec6cf3346b 100644 --- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java +++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java @@ -201,8 +201,12 @@ public SolrCore getCore() { return core; } + /** + * If the request has been created, return its parameters (merges URL and body if applicable); + * otherwise, return only the URL query parameters. + */ public SolrParams getQueryParams() { - return queryParams; + return solrReq != null ? solrReq.getParams() : queryParams; } /** The collection(s) referenced in this request. Populated in {@link #init()}. Not null. */