This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/nutch.git


The following commit(s) were added to refs/heads/2.x by this push:
     new 398eff8  NUTCH-2448: Treat white-space http.agent.version as empty.
398eff8 is described below

commit 398eff8f53b97cd2d25451f22933081bc90406a3
Author: YossiTamari <[email protected]>
AuthorDate: Mon Oct 23 19:26:26 2017 +0300

    NUTCH-2448: Treat white-space http.agent.version as empty.
    
    (And do not append a slash to http.agent.name.)
---
 .../lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.java
index aebe4cf..734e6de 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
@@ -406,7 +406,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);
     }

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to