mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Change Dockerfile because of issue on build echo.java
This commit is contained in:
+3
-1
@@ -18,5 +18,7 @@ RUN go get -u github.com/golang/lint/golint
|
||||
WORKDIR /go/src/github.com/buger/gor/
|
||||
ADD . /go/src/github.com/buger/gor/
|
||||
|
||||
RUN javac -cp /tmp/commons-io-2.4/commons-io-2.4.jar ./examples/middleware/echo.java
|
||||
RUN wget http://archive.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.tar.gz && tar xzf commons-io-2.4-bin.tar.gz && cd commons-io-2.4 && mv commons-io-2.4.jar /tmp/
|
||||
RUN wget http://archive.apache.org/dist/commons/codec/binaries/commons-codec-1.9-bin.tar.gz && tar xzf commons-codec-1.9-bin.tar.gz
|
||||
RUN javac -cp commons-io-2.4/commons-io-2.4.jar -cp commons-codec-1.9/commons-codec-1.9.jar ./examples/middleware/echo.java
|
||||
RUN go get
|
||||
@@ -6,19 +6,19 @@ import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
|
||||
|
||||
public class Echo {
|
||||
public static String decodeHexString(String s) throws DecoderException {
|
||||
return new String(Hex.decodeHex(s.toCharArray()));
|
||||
}
|
||||
class Echo {
|
||||
public static String decodeHexString(String s) throws DecoderException {
|
||||
return new String(Hex.decodeHex(s.toCharArray()));
|
||||
}
|
||||
|
||||
public static String encodeHexString(String s) {
|
||||
return new String(Hex.encodeHex(s.getBytes()));
|
||||
}
|
||||
public static String encodeHexString(String s) {
|
||||
return new String(Hex.encodeHex(s.getBytes()));
|
||||
}
|
||||
|
||||
public static String transformHTTPMessage(String req) {
|
||||
// do actual transformations here
|
||||
return req;
|
||||
}
|
||||
public static String transformHTTPMessage(String req) {
|
||||
// do actual transformations here
|
||||
return req;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws DecoderException {
|
||||
if(args != null){
|
||||
@@ -29,7 +29,7 @@ public class Echo {
|
||||
}
|
||||
|
||||
BufferedReader stdin = new BufferedReader(new InputStreamReader(
|
||||
System.in));
|
||||
System.in));
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user