diff --git a/htroot/CrawlStartExpert.html b/htroot/CrawlStartExpert.html
index 848eaf0cf..ec4a692a0 100644
--- a/htroot/CrawlStartExpert.html
+++ b/htroot/CrawlStartExpert.html
@@ -450,7 +450,7 @@
diff --git a/htroot/CrawlStartExpert.java b/htroot/CrawlStartExpert.java
index 1d36a3970..3f0635052 100644
--- a/htroot/CrawlStartExpert.java
+++ b/htroot/CrawlStartExpert.java
@@ -479,8 +479,7 @@ public class CrawlStartExpert {
prop.put("cachePolicy_iffresh", 1);
}
-
- // ---------- Agent name (untested & untouched)
+ // ---------- Agent name
if (sb.isP2PMode()) {
prop.put("agentSelect", 0);
} else {
@@ -496,10 +495,17 @@ public class CrawlStartExpert {
if (sb.isAllIPMode()) {
agentNames.add(ClientIdentification.browserAgentName);
}
+ String defaultAgentName = agentNames.get(0);
+ if (post != null && post.containsKey("agentName")) {
+ String agentName = post.get("agentName", sb.isIntranetMode() ? ClientIdentification.yacyIntranetCrawlerAgentName : ClientIdentification.yacyInternetCrawlerAgentName);
+ if (agentNames.contains(agentName)) defaultAgentName = agentName;
+ }
for (int i = 0; i < agentNames.size(); i++) {
prop.put("agentSelect_list_" + i + "_name", agentNames.get(i));
+ prop.put("agentSelect_list_" + i + "_default", agentNames.get(i).equals(defaultAgentName) ? 1 : 0);
}
prop.put("agentSelect_list", agentNames.size());
+
}
prop.put("agentSelect_defaultAgentName",
ClientIdentification.yacyInternetCrawlerAgentName);