While processing a Azure blob storage file in Snaplogic, Snaplogic is not able to read it as its encountering with double encoding issue.
I have already tried below method to handle double encoding to fix it and worked well but encountering with other issues due to this.
Example URI :
“https://myaccount.blob.core.windows.net/sascontainer/sasblob.txt?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2017-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D”
Endindex : $data.indexOf(“?”)
Startindex : $data.search(“sascontainer /”)+11
Head: $.data.slice(0,$.startIndex)
Middle : encodeURIComponent(decodeURIComponent($.data.slice($.startIndex,$.endIndex)))
Tail : $.data.slice($.endIndex)
Rest GET service URL: Head + Middle + Tail
above logic is used in Rest GET to read the service url by decoding and encoding only middle part. However this method is also failing even though it handled double encoding as its decoding everything instead of only decoding hexadecimal values of URL.
Is there any other method to decode only those hexadecimal values present in URI and encode whole URI on top of it?