Class I2PTunnelHTTPClientRunner

All Implemented Interfaces:
Runnable, I2PSocket.SocketErrorListener, LimitOutputStream.DoneCallback

public class I2PTunnelHTTPClientRunner extends I2PTunnelRunner
Override the response with a stream filtering the HTTP headers received. Specifically, this makes sure we get Connection: close, so the browser knows they really shouldn't try to use persistent connections. The HTTP server *should* already be setting this, since the HTTP headers sent by the browser specify Connection: close, and the server should echo it. However, both broken and malicious servers could ignore that, potentially confusing the user. Warning - not maintained as a stable API for external use.
  • Constructor Details

    • I2PTunnelHTTPClientRunner

      @Deprecated public I2PTunnelHTTPClientRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail)
      Deprecated.
      use other constructor
      Does NOT start itself. Caller must call start().
    • I2PTunnelHTTPClientRunner

      public I2PTunnelHTTPClientRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail, boolean allowKeepAliveI2P, boolean allowKeepAliveSocket, boolean isHead)
      Does NOT start itself. Caller must call start().
      Parameters:
      allowKeepAliveI2P - we may, but are not required to, keep the I2P socket alive - Requires allowKeepAliveSocket
      allowKeepAliveSocket - we may, but are not required to, keep the browser-side socket alive NO data will be forwarded from the socket to the i2psocket other than initialI2PData if this is true.
      isHead - is this a response to a HEAD, and thus no data is expected (RFC 2616 sec. 4.4)
      Since:
      0.9.62
  • Method Details