You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Jose Antonio Insua (Jira)" <ji...@apache.org> on 2021/11/17 01:41:00 UTC

[jira] [Updated] (SLING-10925) OsgiConsoleClient breaks if response Location header is an absolute URL

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

Jose Antonio Insua updated SLING-10925:
---------------------------------------
    Summary: OsgiConsoleClient breaks if response Location header is an absolute URL  (was: OsgiConsoleClient breaks if Location header is an absolute URL)

> OsgiConsoleClient breaks if response Location header is an absolute URL
> -----------------------------------------------------------------------
>
>                 Key: SLING-10925
>                 URL: https://issues.apache.org/jira/browse/SLING-10925
>             Project: Sling
>          Issue Type: Bug
>          Components: Apache Sling Testing Clients
>    Affects Versions: Apache Sling Testing Clients 2.0.10
>            Reporter: Jose Antonio Insua
>            Priority: Major
>
> OsgiConsoleClient.editConfiguration() breaks if the response has an absolute URL.
>  
> The extra characters break the logic of the return statement:
> {code:java}
> return locationHeader[0].getValue().substring(URL_CONFIGURATION.length() + 1);
> {code}
> This can be easily accounted for:
> {code:java}
>             int urlPathStart = locationHeader[0].getValue().indexOf(URL_CONFIGURATION);
>             return locationHeader[0].getValue().substring(urlPathStart + URL_CONFIGURATION.length() + 1)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)