added default User-Agent

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4763 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent 8c5f062e0b
commit d32fe84472

@ -244,9 +244,8 @@ public final class yacy {
// if we are running an SVN version, we try to detect the used svn revision now ...
final Properties buildProp = new Properties();
File buildPropFile = null;
File buildPropFile = new File(homePath,"build.properties");
try {
buildPropFile = new File(homePath,"build.properties");
buildProp.load(new FileInputStream(buildPropFile));
} catch (Exception e) {
serverLog.logWarning("STARTUP", buildPropFile.toString() + " not found in settings path");
@ -327,11 +326,8 @@ public final class yacy {
yacyVersion.deleteOldDownloads(sb.releasePath, deleteOldDownloadsAfterDays );
// set user-agent
final yacyVersion thisversion = yacyVersion.thisVersion();
final String userAgent = "yacy/" + ((thisversion == null) ? "0.0" : thisversion.releaseNr) +
" (www.yacy.net; " + de.anomic.http.HttpClient.getSystemOST() + ") " +
// last ; must be before location (this is parsed)
JakartaCommonsHttpClient.getCurrentUserAgent().replace(';', ':');
final String userAgent = "yacy/" + Double.toString(version) + " (www.yacy.net; "
+ de.anomic.http.HttpClient.getSystemOST() + ")";
JakartaCommonsHttpClient.setUserAgent(userAgent);
// start main threads

Loading…
Cancel
Save