merge of '878149500938c6886eb9e0274ba0901e8fe3a3bb'

and 'deab42b1e2bfe970ba51a868ab2b8c47181fdd15'
This commit is contained in:
z3d
2010-12-22 00:03:56 +00:00
20 changed files with 1608 additions and 1594 deletions

View File

@@ -7,6 +7,8 @@ package org.klomp.snark;
* It is also passed from PeerState to PeerCoordinator when
* a piece is not completely downloaded, for example
* when the Peer disconnects or chokes.
*
* @since 0.8.2
*/
class PartialPiece implements Comparable {

View File

@@ -31,7 +31,9 @@ public class I2PTunnelClient extends I2PTunnelClientBase {
public I2PTunnelClient(int localPort, String destinations, Logging l,
boolean ownDest, EventDispatcher notifyThis,
I2PTunnel tunnel, String pkf) throws IllegalArgumentException {
super(localPort, ownDest, l, notifyThis, "SynSender", tunnel, pkf);
super(localPort, ownDest, l, notifyThis,
"Standard client on " + tunnel.listenHost + ':' + localPort,
tunnel, pkf);
if (waitEventValue("openBaseClientResult").equals("error")) {
notifyEvent("openClientResult", "error");

View File

@@ -73,7 +73,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
_proxyList = new ArrayList(4);
}
/** all auth @ince 0.8.2 */
/** all auth @since 0.8.2 */
public static final String PROP_AUTH = "proxyAuth";
public static final String PROP_USER = "proxyUsername";
public static final String PROP_PW = "proxyPassword";

View File

@@ -355,6 +355,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Read the http command [" + command.toString() + "]");
// FIXME we probably don't need or want this in the outgoing direction
int trimmed = 0;
if (command.length() > 0) {
for (int i = 0; i < command.length(); i++) {
@@ -394,7 +395,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
else if ("X-Accept-encoding".equalsIgnoreCase(name))
name = "X-Accept-encoding";
//We want to remove certain headers to improve anonymity
// For incoming, we remove certain headers to prevent spoofing.
// For outgoing, we remove certain headers to improve anonymity.
boolean skip = false;
for (String skipHeader: skipHeaders) {
if (skipHeader.equalsIgnoreCase(name)) {