Class HTTPResponseOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    class HTTPResponseOutputStream
    extends FilterOutputStream
    This does the transparent gzip decompression on the client side. Extended in I2PTunnelHTTPServer to do the compression on the server side. Simple stream for delivering an HTTP response to the client, trivially filtered to make sure "Connection: close" is always in the response. Perhaps add transparent handling of the Content-Encoding: x-i2p-gzip, adjusting the headers to say Content-Encoding: identity? Content-Encoding: gzip is trivial as well, but Transfer-Encoding: chunked makes it more work than is worthwhile at the moment.