You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2021/11/18 11:32:00 UTC
[jira] [Resolved] (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 ]
Robert Munteanu resolved SLING-10925.
-------------------------------------
Fix Version/s: Apache Sling Testing Clients 2.0.12
Assignee: Angela Schreiber
Resolution: Fixed
> 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
> Assignee: Angela Schreiber
> Priority: Major
> Fix For: Apache Sling Testing Clients 2.0.12
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> OsgiConsoleClient.editConfiguration() breaks if the HTTP response has an absolute URL in the Location header.
>
> 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)