- upgraded httpclient, httpcore and httpmime

- removed httpclient 3.1 which has been used by solrj < 4.x.x and is now
not used any more
- fixed some parts in YaCy which used methods from httpclient 3.1
pull/1/head
Michael Peter Christen 12 years ago
parent 4b100f8b48
commit ad050ec88d

@ -33,13 +33,9 @@
<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="lib/httpcore-4.2.3.jar" sourcepath="/Volumes/Raptor/Data/sourcecode/httpcore/src/main/java"/>
<classpathentry kind="lib" path="lib/httpclient-4.2.3.jar" sourcepath="/Volumes/Raptor/Data/sourcecode/httpclient/src/main/java"/>
<classpathentry kind="lib" path="lib/httpmime-4.2.3.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.1.jar"/>
<classpathentry kind="lib" path="lib/commons-compress-1.4.1.jar"/>
<classpathentry kind="lib" path="lib/commons-lang-2.6.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.1.jar"/>
<classpathentry kind="lib" path="lib/servlet-api-2.5-20081211.jar"/>
<classpathentry kind="lib" path="lib/jaudiotagger-2.0.4-20111207.115108-15.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.7.jar"/>
@ -71,6 +67,9 @@
<classpathentry kind="lib" path="lib/pdfbox-1.8.1.jar"/>
<classpathentry kind="lib" path="lib/jempbox-1.8.1.jar"/>
<classpathentry kind="lib" path="lib/fontbox-1.8.1.jar"/>
<classpathentry kind="lib" path="lib/httpclient-4.2.5.jar"/>
<classpathentry kind="lib" path="lib/httpcore-4.2.4.jar"/>
<classpathentry kind="lib" path="lib/httpmime-4.2.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="lib/icu4j-core.jar"/>
<classpathentry kind="lib" path="lib/htmllexer.jar"/>

@ -45,7 +45,6 @@
<string>$JAVAROOT/lib/commons-codec-1.7.jar</string>
<string>$JAVAROOT/lib/commons-compress-1.4.1.jar</string>
<string>$JAVAROOT/lib/commons-fileupload-1.2.2.jar</string>
<string>$JAVAROOT/lib/commons-httpclient-3.1.jar</string>
<string>$JAVAROOT/lib/commons-io-2.1.jar</string>
<string>$JAVAROOT/lib/commons-jxpath-1.3.jar</string>
<string>$JAVAROOT/lib/commons-lang-2.6.jar</string>
@ -54,9 +53,9 @@
<string>$JAVAROOT/lib/geronimo-stax-api_1.0_spec-1.0.1.jar</string>
<string>$JAVAROOT/lib/guava-13.0.1.jar</string>
<string>$JAVAROOT/lib/htmllexer.jar</string>
<string>$JAVAROOT/lib/httpclient-4.2.3.jar</string>
<string>$JAVAROOT/lib/httpcore-4.2.3.jar</string>
<string>$JAVAROOT/lib/httpmime-4.2.3.jar</string>
<string>$JAVAROOT/lib/httpclient-4.2.5.jar</string>
<string>$JAVAROOT/lib/httpcore-4.2.4.jar</string>
<string>$JAVAROOT/lib/httpmime-4.2.5.jar</string>
<string>$JAVAROOT/lib/icu4j-core.jar</string>
<string>$JAVAROOT/lib/iri-0.8.jar</string>
<string>$JAVAROOT/lib/J7Zip-modified.jar</string>

@ -164,7 +164,6 @@
<pathelement location="${lib}/commons-codec-1.7.jar" />
<pathelement location="${lib}/commons-compress-1.4.1.jar" />
<pathelement location="${lib}/commons-fileupload-1.2.2.jar" />
<pathelement location="${lib}/commons-httpclient-3.1.jar" />
<pathelement location="${lib}/commons-io-2.1.jar" />
<pathelement location="${lib}/commons-jxpath-1.3.jar" />
<pathelement location="${lib}/commons-lang-2.6.jar" />
@ -173,9 +172,9 @@
<pathelement location="${lib}/geronimo-stax-api_1.0_spec-1.0.1.jar" />
<pathelement location="${lib}/guava-13.0.1.jar" />
<pathelement location="${lib}/htmllexer.jar" />
<pathelement location="${lib}/httpclient-4.2.3.jar" />
<pathelement location="${lib}/httpcore-4.2.3.jar" />
<pathelement location="${lib}/httpmime-4.2.3.jar" />
<pathelement location="${lib}/httpclient-4.2.5.jar" />
<pathelement location="${lib}/httpcore-4.2.4.jar" />
<pathelement location="${lib}/httpmime-4.2.5.jar" />
<pathelement location="${lib}/icu4j-core.jar" />
<pathelement location="${lib}/iri-0.8.jar" />
<pathelement location="${lib}/J7Zip-modified.jar" />

Binary file not shown.

@ -34,7 +34,6 @@ import net.yacy.kelondro.logging.Log;
import net.yacy.search.schema.CollectionSchema;
import net.yacy.search.schema.WebgraphSchema;
import org.apache.commons.httpclient.HttpException;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpEntity;
@ -146,14 +145,14 @@ public class RemoteInstance implements SolrInstance {
};
this.client.addRequestInterceptor(new HttpRequestInterceptor() {
@Override
public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
public void process(final HttpRequest request, final HttpContext context) throws IOException {
if (!request.containsHeader("Accept-Encoding")) request.addHeader("Accept-Encoding", "gzip");
}
});
this.client.addResponseInterceptor(new HttpResponseInterceptor() {
@Override
public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
public void process(final HttpResponse response, final HttpContext context) throws IOException {
HttpEntity entity = response.getEntity();
if (entity != null) {
Header ceheader = entity.getContentEncoding();

@ -53,6 +53,7 @@ import net.yacy.cora.federate.solr.instance.InstanceMirror;
import net.yacy.cora.federate.solr.instance.RemoteInstance;
import net.yacy.cora.federate.solr.instance.ShardInstance;
import net.yacy.cora.order.CloneableIterator;
import net.yacy.cora.protocol.HeaderFramework;
import net.yacy.cora.sorting.ReversibleScoreMap;
import net.yacy.cora.sorting.ScoreMap;
import net.yacy.cora.sorting.WeakPriorityBlockingQueue;
@ -75,7 +76,6 @@ import net.yacy.search.schema.CollectionSchema;
import net.yacy.search.schema.WebgraphConfiguration;
import net.yacy.search.schema.WebgraphSchema;
import org.apache.commons.httpclient.util.DateUtil;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
@ -917,7 +917,7 @@ public final class Fulltext {
pw.println("<link>" + MultiProtocolURI.escape(url) + "</link>");
if (author != null && !author.isEmpty()) pw.println("<author>" + CharacterCoding.unicode2xml(author, true) + "</author>");
if (description != null && !description.isEmpty()) pw.println("<description>" + CharacterCoding.unicode2xml(description, true) + "</description>");
if (date != null) pw.println("<pubDate>" + DateUtil.formatDate(date) + "</pubDate>");
if (date != null) pw.println("<pubDate>" + HeaderFramework.formatRFC1123(date) + "</pubDate>");
if (size != null) pw.println("<yacy:size>" + size.intValue() + "</yacy:size>");
pw.println("<guid isPermaLink=\"false\">" + hash + "</guid>");
pw.println("</item>");

@ -38,8 +38,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import org.apache.commons.httpclient.HttpMethod;
/**
* <p>Transparently coalesces chunks of a HTTP stream that uses

Loading…
Cancel
Save