You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mikhail Khludnev (Jira)" <ji...@apache.org> on 2019/09/03 20:41:00 UTC

[jira] [Updated] (SOLR-13727) V2Requests: HttpSolrClient replaces first instance of "/solr" with "/api" instead of using regex pattern

     [ https://issues.apache.org/jira/browse/SOLR-13727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Khludnev updated SOLR-13727:
------------------------------------
    Status: Patch Available  (was: Open)

> V2Requests: HttpSolrClient replaces first instance of "/solr" with "/api" instead of using regex pattern
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-13727
>                 URL: https://issues.apache.org/jira/browse/SOLR-13727
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java, v2 API
>    Affects Versions: 8.2
>            Reporter: Megan Carey
>            Priority: Major
>              Labels: easyfix, patch
>         Attachments: SOLR-13727.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When the HttpSolrClient is formatting a V2Request, it needs to change the endpoint from the default "/solr/..." to "/api/...". It does so by simply calling String.replace, which replaces the first instance of "/solr" in the URL with "/api".
>  
> In the case where the host's address starts with "solr" and the HTTP protocol is appended, this call changes the address for the request. Example:
> if baseUrl is "http://solr-host.com/8983/solr", this call will change to "http:/api-host.com:8983/solr"
>  
> We should use a regex pattern to ensure that we're replacing the correct portion of the URL.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org