[Library|Trunk]

fix reload issue: double encoding return 404 or error



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60626 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-03-11 14:11:23 +00:00
parent 3f64157136
commit 3d76b4dc22
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ export class Session {
}
params = (params && params.split("?").length > 1) ? params.split("?")[1] : params;
for (var i = 0; i < params.split("&").length; i++) {
object[(params.split("&")[i]).split("=")[0]] = (params.split("&")[i]).split("=")[1];
object[(params.split("&")[i]).split("=")[0]] = decodeURIComponent((params.split("&")[i]).split("=")[1]);
}
return object;

View File

@ -27,11 +27,11 @@ export class PiwikService {
let referrer = this.getReferrer();
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId);
if(typeof location !== 'undefined' && piwikId){
console.log("Piwik - View: " + pageURL, title);
// console.log("Piwik - View: " + pageURL, title);
var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(pageURL)+"&action_name="+StringUtils.URIEncode(title)+
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
console.log("Piwik - View: " + url);
// console.log("Piwik - View: " + url);
// return Observable.of(new Object()); // for testing
return this.http.get( url, {responseType: 'blob'});
// .do(request => console.info("Piwik request completed" ));