Apache Nutch is an extensible and scalable web crawler
NUTCH-2448: Treat white-space http.agent.version as empty.
YossiTamari9f54d5b3ec5a
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.javaindex 491d32b52..b8d2c6fa5 100644--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java@@ -438,7 +438,7 @@ public abstract class HttpBase implements Protocol {StringBuffer buf = new StringBuffer();buf.append(agentName);- if (agentVersion != null) {+ if (agentVersion != null && !agentVersion.trim().isEmpty()) {buf.append("/");buf.append(agentVersion);}@@ -604,4 +604,4 @@ public abstract class HttpBase implements Protocol {}return hm;}-}\ No newline at end of file+}