mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Update to latest HTTP Core/Client libs
git-svn-id: https://zxing.googlecode.com/svn/trunk@518 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
f02c4f0cfc
commit
d0af16c36c
|
@ -20,7 +20,7 @@
|
||||||
<property file="secrets.properties"/>
|
<property file="secrets.properties"/>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp/>
|
<tstamp/>
|
||||||
<fail message="Please build 'core' first">
|
<fail message="Please build 'core' first">
|
||||||
<condition>
|
<condition>
|
||||||
<not>
|
<not>
|
||||||
|
@ -35,10 +35,17 @@
|
||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
|
<fail message="Please set 'tomcat-home' in build.properties">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<available file="${tomcat-home}" type="dir"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="build" depends="init">
|
<target name="build" depends="init">
|
||||||
<mkdir dir="web/WEB-INF/classes"/>
|
<mkdir dir="web/WEB-INF/classes"/>
|
||||||
<copy file="../core/core.jar" todir="web/WEB-INF/lib" overwrite="true"/>
|
<copy file="../core/core.jar" todir="web/WEB-INF/lib" overwrite="true"/>
|
||||||
<copy file="../javase/javase.jar" todir="web/WEB-INF/lib" overwrite="true"/>
|
<copy file="../javase/javase.jar" todir="web/WEB-INF/lib" overwrite="true"/>
|
||||||
<javac srcdir="src"
|
<javac srcdir="src"
|
||||||
|
@ -48,13 +55,13 @@
|
||||||
optimize="true"
|
optimize="true"
|
||||||
debug="true"
|
debug="true"
|
||||||
deprecation="true">
|
deprecation="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="web/WEB-INF/lib">
|
<fileset dir="web/WEB-INF/lib">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
<pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
|
<pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
<copy file="web/WEB-INF/web.xml.template" tofile="web/WEB-INF/web.xml" overwrite="true">
|
<copy file="web/WEB-INF/web.xml.template" tofile="web/WEB-INF/web.xml" overwrite="true">
|
||||||
<filterset>
|
<filterset>
|
||||||
<filter token="EMAIL_PASSWORD" value="${emailPassword}"/>
|
<filter token="EMAIL_PASSWORD" value="${emailPassword}"/>
|
||||||
|
@ -72,7 +79,7 @@
|
||||||
</war>
|
</war>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="web/WEB-INF/web.xml"/>
|
<delete dir="web/WEB-INF/web.xml"/>
|
||||||
<delete dir="web/WEB-INF/classes"/>
|
<delete dir="web/WEB-INF/classes"/>
|
||||||
<delete file="web/WEB-INF/lib/core.jar"/>
|
<delete file="web/WEB-INF/lib/core.jar"/>
|
||||||
|
|
|
@ -36,9 +36,9 @@ import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.HttpVersion;
|
import org.apache.http.HttpVersion;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
import org.apache.http.conn.PlainSocketFactory;
|
import org.apache.http.conn.scheme.PlainSocketFactory;
|
||||||
import org.apache.http.conn.Scheme;
|
import org.apache.http.conn.scheme.Scheme;
|
||||||
import org.apache.http.conn.SchemeRegistry;
|
import org.apache.http.conn.scheme.SchemeRegistry;
|
||||||
import org.apache.http.conn.ssl.SSLSocketFactory;
|
import org.apache.http.conn.ssl.SSLSocketFactory;
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
import org.apache.http.impl.client.DefaultHttpClient;
|
||||||
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
|
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
|
||||||
|
@ -160,9 +160,6 @@ public final class DecodeServlet extends HttpServlet {
|
||||||
} finally {
|
} finally {
|
||||||
is.close();
|
is.close();
|
||||||
}
|
}
|
||||||
} catch (InterruptedException ie) {
|
|
||||||
getRequest.abort();
|
|
||||||
response.sendRedirect("badurl.jspx");
|
|
||||||
} catch (HttpException he) {
|
} catch (HttpException he) {
|
||||||
getRequest.abort();
|
getRequest.abort();
|
||||||
response.sendRedirect("badurl.jspx");
|
response.sendRedirect("badurl.jspx");
|
||||||
|
|
Binary file not shown.
BIN
zxingorg/web/WEB-INF/lib/httpclient-4.0-alpha4.jar
Normal file
BIN
zxingorg/web/WEB-INF/lib/httpclient-4.0-alpha4.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
zxingorg/web/WEB-INF/lib/httpcore-nio-4.0-beta2.jar
Normal file
BIN
zxingorg/web/WEB-INF/lib/httpcore-nio-4.0-beta2.jar
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue