Initial version based on previous work. (Version alpha 7)

This commit is contained in:
Jindra Petk
2010-09-04 13:57:22 +02:00
commit a34ee7364c
1147 changed files with 84884 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
package com.jpexs.proxy;
import java.io.IOException;
/**
* @author Mark Boyns
*/
class Https extends HttpConnection {
boolean proxy = false;
Https(String host, int port) throws IOException {
super(host, port);
}
Https(String host, int port, boolean isProxy) throws IOException {
this(host, port);
proxy = isProxy;
}
public void sendRequest(Request request)
throws IOException, RetryRequestException {
if (proxy) {
super.sendRequest(request);
} else {
/* nothing */
}
}
public Reply recvReply(Request request)
throws IOException, RetryRequestException {
Reply reply = new Reply(getInputStream());
if (proxy) {
reply.read();
} else {
reply.statusLine = "HTTP/1.0 200 Connection established";
reply.setHeaderField("Proxy-agent", "ASDec");
}
return reply;
}
}