Changeset 8e709ee


Ignore:
Timestamp:
Dec 15, 2010 3:19:09 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2deee2b1
Parents:
c7c7731
Message:

fixup after prop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java

    rc7c7731 r8e709ee  
    140140            if (allowGZIP && useGZIP) {
    141141                I2PAppThread req = new I2PAppThread(
    142                     new CompressedRequestor(s, socket, modifiedHeader, getTunnel().getContext()),
     142                    new CompressedRequestor(s, socket, modifiedHeader, getTunnel().getContext(), _log),
    143143                        Thread.currentThread().getName()+".hc");
    144144                req.start();
     
    180180   
    181181    private static class CompressedRequestor implements Runnable {
    182         private Socket _webserver;
    183         private I2PSocket _browser;
    184         private String _headers;
    185         private I2PAppContext _ctx;
    186         public CompressedRequestor(Socket webserver, I2PSocket browser, String headers, I2PAppContext ctx) {
     182        private final Socket _webserver;
     183        private final I2PSocket _browser;
     184        private final String _headers;
     185        private final I2PAppContext _ctx;
     186        // shadows _log in super()
     187        private final Log _log;
     188
     189        public CompressedRequestor(Socket webserver, I2PSocket browser, String headers, I2PAppContext ctx, Log log) {
    187190            _webserver = webserver;
    188191            _browser = browser;
    189192            _headers = headers;
    190193            _ctx = ctx;
     194            _log = log;
    191195        }
    192196
     
    236240                compressedOut.write(modifiedHeaders.getBytes());
    237241
    238                 Sender s = new Sender(compressedOut, serverin, "server: server to browser");
     242                Sender s = new Sender(compressedOut, serverin, "server: server to browser", _log);
    239243                if (_log.shouldLog(Log.INFO))
    240244                    _log.info("Before pumping the compressed response");
     
    379383        if (!ok) throw new IOException("EOF reached while reading the HTTP command [" + command.toString() + "]");
    380384       
    381         if (_log.shouldLog(Log.DEBUG))
    382             _log.debug("Read the http command [" + command.toString() + "]");
     385        //if (_log.shouldLog(Log.DEBUG))
     386        //    _log.debug("Read the http command [" + command.toString() + "]");
    383387       
    384388        int trimmed = 0;
     
    434438
    435439                headers.setProperty(name, value);
    436                 if (_log.shouldLog(Log.DEBUG))
    437                     _log.debug("Read the header [" + name + "] = [" + value + "]");
     440                //if (_log.shouldLog(Log.DEBUG))
     441                //    _log.debug("Read the header [" + name + "] = [" + value + "]");
    438442            }
    439443        }
Note: See TracChangeset for help on using the changeset viewer.