Source:
<code>protected String getBaseParameters(Item item) throws UnsupportedEncodingException { String clientIP = request.getRemoteAddr(); if (configurationService.getBooleanProperty("useProxies", false) && request .getHeader("X-Forwarded-For") != null) { for (String xfip : request.getHeader("X-Forwarded-For").split(",")) { if (!request.getHeader("X-Forwarded-For").contains(clientIP)) { clientIP = xfip.trim(); } } } String clientUA = StringUtils.defaultIfBlank(request.getHeader("USER-AGENT"), ""); String referer = StringUtils.defaultIfBlank(request.getHeader("referer"), ""); StringBuilder data = new StringBuilder(); data.append(URLEncoder.encode("url_ver", UTF_8) + "=" + URLEncoder.encode(trackerUrlVersion, UTF_8)); data.append("&").append(URLEncoder.encode("req_id", UTF_8)).append("=") .append(URLEncoder.encode(clientIP, UTF_8)); data.append("&").append(URLEncoder.encode("req_dat", UTF_8)).append("=") .append(URLEncoder.encode(clientUA, UTF_8)); data.append("&").append(URLEncoder.encode("rft.artnum", UTF_8)).append("="). <START> append(URLEncoder.encode("oai:" + configurationService.getProperty("dspace.hostname") + ":" + item <END> .getHandle(), UTF_8)); data.append("&").append(URLEncoder.encode("rfr_dat", UTF_8)).append("=") .append(URLEncoder.encode(referer, UTF_8)); data.append("&").append(URLEncoder.encode("rfr_id", UTF_8)).append("=") .append(URLEncoder.encode(configurationService.getProperty("dspace.hostname"), UTF_8)); data.append("&").append(URLEncoder.encode("url_tim", UTF_8)).append("=") .append(URLEncoder.encode(getCurrentDateString(), UTF_8)); return data.toString(); }</code><technical_language>FYI dspace.hostname config longer exists in configuration. replacement is longer a guarantee of a single hostname. For OAI-PMH urls though, a oai.identifier.prefix configuration, is want here. is a Utils.getHostname() method based a passed in URL. changes in PR #2657</technical_language>

Target:
protected String getBaseParameters(Item item) throws UnsupportedEncodingException { String clientIP = request.getRemoteAddr(); if (configurationService.getBooleanProperty("useProxies", false) && request .getHeader("X-Forwarded-For") != null) { for (String xfip : request.getHeader("X-Forwarded-For").split(",")) { if (!request.getHeader("X-Forwarded-For").contains(clientIP)) { clientIP = xfip.trim(); } } } String clientUA = StringUtils.defaultIfBlank(request.getHeader("USER-AGENT"), ""); String referer = StringUtils.defaultIfBlank(request.getHeader("referer"), ""); StringBuilder data = new StringBuilder(); data.append(URLEncoder.encode("url_ver", UTF_8) + "=" + URLEncoder.encode(trackerUrlVersion, UTF_8)); data.append("&").append(URLEncoder.encode("req_id", UTF_8)).append("=") .append(URLEncoder.encode(clientIP, UTF_8)); data.append("&").append(URLEncoder.encode("req_dat", UTF_8)).append("=") .append(URLEncoder.encode(clientUA, UTF_8)); String hostName = Utils.getHostName(configurationService.getProperty("dspace.ui.url")); data.append("&").append(URLEncoder.encode("rft.artnum", UTF_8)).append("="). append(URLEncoder.encode("oai:" + hostName + ":" + item .getHandle(), UTF_8)); data.append("&").append(URLEncoder.encode("rfr_dat", UTF_8)).append("=") .append(URLEncoder.encode(referer, UTF_8)); data.append("&").append(URLEncoder.encode("rfr_id", UTF_8)).append("=") .append(URLEncoder.encode(hostName, UTF_8)); data.append("&").append(URLEncoder.encode("url_tim", UTF_8)).append("=") .append(URLEncoder.encode(getCurrentDateString(), UTF_8)); return data.toString(); }