[ 
https://issues.apache.org/jira/browse/SLING-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997751#comment-16997751
 ] 

Alexei Krainiouk edited comment on SLING-8921 at 12/17/19 1:04 AM:
-------------------------------------------------------------------

[~volteanu] Thanks creating a ticket. I have submitted a pull request for this:
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/14

modified implementation uses different URI constructor that takes path as as 
separate parameter. It still attempts to handle special cases when supplied 
path contains ':' character in which case the beginning of the path value is 
treated as URI scheme followed by optional host. However this happens to be 
consistent with unit test expectations so we should be good here.
Note that this change brakes compatibility with [this 
commit|https://github.com/adobe/aem-test-samples/commit/cf6c1685102f2487de359d705a868ca9659b7986]
 to aem-test-samples repo which should be reverted in order for the smoke tests 
to continue to work. 


was (Author: akrainiouk):
[~volteanu] Thanks creating a ticket. I have submitted a pull request for this:
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/14

modified implementation uses different URI constructor that takes path as as 
separate parameter. It still attempts to handle special cases when supplied 
path contains ':' character in which case the beginning of the path value is 
treated as URI scheme followed by optional host. However this happens to be 
consistent with unit test expectations so we should be good here.
Note that this change brakes compatibility with [this 
commit|https://github.com/adobe/aem-test-samples/commit/cf6c1685102f2487de359d705a868ca9659b7986]
 to aem-test-samples repo and it should be reverted in order for the smoke 
tests to continue to work. 

> requestPath must to be encoded in SlingClient#doGet()
> -----------------------------------------------------
>
>                 Key: SLING-8921
>                 URL: https://issues.apache.org/jira/browse/SLING-8921
>             Project: Sling
>          Issue Type: Bug
>          Components: Apache Sling Testing Clients
>            Reporter: Valentin Olteanu
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> [SlingClient#doGet()|https://github.com/apache/sling-org-apache-sling-testing-clients/blob/609cb61fd2dec08657556b9adc91e889911a230e/src/main/java/org/apache/sling/testing/clients/AbstractSlingClient.java#L492]
>  requires `requestPath` to be encoded (because it's passed to multiple URI 
> constructors). 
> The contract should be uniform: all the parameters are passed decoded and the 
> method takes care to encode them properly before creating the request.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to