You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by le...@apache.org on 2013/12/23 18:17:53 UTC
svn commit: r1553154 - in /nutch/branches/2.x/src:
java/org/apache/nutch/net/protocols/Response.java
plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java
Author: lewismc
Date: Mon Dec 23 17:17:53 2013
New Revision: 1553154
URL: http://svn.apache.org/r1553154
Log:
NUTCH-1360 Support the storing of IP address connected to when web crawling
Modified:
nutch/branches/2.x/src/java/org/apache/nutch/net/protocols/Response.java
nutch/branches/2.x/src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java
Modified: nutch/branches/2.x/src/java/org/apache/nutch/net/protocols/Response.java
URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/net/protocols/Response.java?rev=1553154&r1=1553153&r2=1553154&view=diff
==============================================================================
--- nutch/branches/2.x/src/java/org/apache/nutch/net/protocols/Response.java (original)
+++ nutch/branches/2.x/src/java/org/apache/nutch/net/protocols/Response.java Mon Dec 23 17:17:53 2013
@@ -25,7 +25,7 @@ import org.apache.nutch.metadata.Metadat
/**
- * A response inteface. Makes all protocols model HTTP.
+ * A response interface. Makes all protocols model HTTP.
*/
public interface Response extends HttpHeaders {
Modified: nutch/branches/2.x/src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java
URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java?rev=1553154&r1=1553153&r2=1553154&view=diff
==============================================================================
--- nutch/branches/2.x/src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java (original)
+++ nutch/branches/2.x/src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java Mon Dec 23 17:17:53 2013
@@ -39,11 +39,11 @@ import org.apache.nutch.protocol.Protoco
import org.apache.nutch.protocol.http.api.HttpBase;
import org.apache.nutch.protocol.http.api.HttpException;
import org.apache.nutch.storage.WebPage;
-import org.apache.nutch.util.NutchConfiguration;
/** An HTTP response. */
public class HttpResponse implements Response {
+ private Configuration conf;
private final HttpBase http;
private final URL url;
private byte[] content;
@@ -93,7 +93,7 @@ public class HttpResponse implements Res
InetSocketAddress sockAddr= new InetSocketAddress(sockHost, sockPort);
socket.connect(sockAddr, http.getTimeout());
- Configuration conf = NutchConfiguration.create();
+ conf = http.getConf();
if (sockAddr != null
&& conf.getBoolean("store.ip.address", false) == true) {
String ipString = sockAddr.getAddress().getHostAddress(); //get the ip address