[
https://issues.apache.org/jira/browse/NUTCH-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14614244#comment-14614244
]
Peter Ciuffetti commented on NUTCH-1086:
----------------------------------------
After and unsuccessful an attempt to resolve NUTCH-2059 I though Id try this
upgrade to httpclient. I placed the attached java files into a branch based on
the v1.11 trunk. But Im getting a unit test failure and some deprecation
compiler warnings.
{code}
compile:
[echo] Compiling plugin: protocol-httpclient
[javac] Compiling 10 source files to
/Users/pciuffetti/Documents/Dev/workspace/nutch/build/protocol-httpclient/classes
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:35:
warning: [deprecation] ConnRoutePNames in org.apache.http.conn.params has been
deprecated
[javac] import org.apache.http.conn.params.ConnRoutePNames;
[javac] ^
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:37:
warning: [deprecation] DefaultHttpClient in org.apache.http.impl.client has
been deprecated
[javac] import org.apache.http.impl.client.DefaultHttpClient;
[javac] ^
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:68:
warning: [deprecation] DefaultHttpClient in org.apache.http.impl.client has
been deprecated
[javac] private static DefaultHttpClient client = new DefaultHttpClient();
[javac] ^
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:68:
warning: [deprecation] DefaultHttpClient in org.apache.http.impl.client has
been deprecated
[javac] private static DefaultHttpClient client = new DefaultHttpClient();
[javac] ^
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:96:
warning: [deprecation] DefaultHttpClient in org.apache.http.impl.client has
been deprecated
[javac] static synchronized DefaultHttpClient getClient() {
[javac] ^
[javac]
/Users/pciuffetti/Documents/Dev/workspace/nutch/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java:201:
warning: [deprecation] ConnRoutePNames in org.apache.http.conn.params has been
deprecated
[javac]
client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
[javac] ^
[javac] 6 warnings
{code}
{code}
Testcase: testNtlmAuth took 1.791 sec
FAILED
HTTP Status Code for http://127.0.0.1:47501/ntlm.jsp expected:<200> but
was:<401>
junit.framework.AssertionFailedError: HTTP Status Code for
http://127.0.0.1:47501/ntlm.jsp expected:<200> but was:<401>
at
org.apache.nutch.protocol.httpclient.TestProtocolHttpClient.fetchPage(TestProtocolHttpClient.java:200)
at
org.apache.nutch.protocol.httpclient.TestProtocolHttpClient.testNtlmAuth(TestProtocolHttpClient.java:162)
{code}
...will investigate if I can resolve these.
> Rewrite protocol-httpclient
> ---------------------------
>
> Key: NUTCH-1086
> URL: https://issues.apache.org/jira/browse/NUTCH-1086
> Project: Nutch
> Issue Type: Improvement
> Components: protocol
> Affects Versions: nutchgora, 1.5
> Reporter: Markus Jelsma
> Assignee: Fabio Santagostino
> Fix For: 2.4
>
> Attachments: Http.java, HttpResponse.java
>
>
> There are several issues about protocol-httpclient and several comments about
> rewriting the plugin with the new http client libraries. There is, however,
> not yet an issue for rewriting/reimplementing protocol-httpclient.
> http://hc.apache.org/httpcomponents-client-ga/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)