Changeset 610f1f7


Ignore:
Timestamp:
Dec 1, 2004 10:31:55 PM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
cb930a7
Parents:
516d0b4
git-author:
jrandom <jrandom> (12/01/04 22:31:55)
git-committer:
zzz <zzz@…> (12/01/04 22:31:55)
Message:
  • 2004-12-01 0.4.2.1 released

2004-12-01 jrandom

  • Strip out any of the Accept-* HTTP header lines, and always make sure to include the forged User-agent header.
  • Adjust the default read timeout on the eepproxy to 60s, unless overridden.
  • Minor tweak on stream shutdown.
Files:
5 edited

Legend:

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

    r516d0b4 r610f1f7  
    2020import net.i2p.I2PException;
    2121import net.i2p.client.streaming.I2PSocket;
     22import net.i2p.client.streaming.I2PSocketOptions;
    2223import net.i2p.data.DataFormatException;
    2324import net.i2p.data.Destination;
     
    143144            return proxy;
    144145        }
     146    }
     147
     148    private static final int DEFAULT_READ_TIMEOUT = 60*1000;
     149   
     150    /**
     151     * create the default options (using the default timeout, etc)
     152     *
     153     */
     154    protected I2PSocketOptions getDefaultOptions() {
     155        I2PSocketOptions opts = super.getDefaultOptions();
     156        Properties defaultOpts = getTunnel().getClientOptions();
     157        if (!defaultOpts.contains(I2PSocketOptions.PROP_READ_TIMEOUT))
     158            opts.setReadTimeout(DEFAULT_READ_TIMEOUT);
     159        return opts;
     160    }
     161   
     162    /**
     163     * create the default options (using the default timeout, etc)
     164     *
     165     */
     166    protected I2PSocketOptions getDefaultOptions(Properties overrides) {
     167        I2PSocketOptions opts = super.getDefaultOptions(overrides);
     168        Properties defaultOpts = getTunnel().getClientOptions();
     169        defaultOpts.putAll(overrides);
     170        if (!defaultOpts.containsKey(I2PSocketOptions.PROP_READ_TIMEOUT))
     171            opts.setConnectTimeout(DEFAULT_READ_TIMEOUT);
     172        return opts;
    145173    }
    146174   
     
    296324                            _log.info(getPrefix(requestId) + "Setting host = " + host);
    297325                    } else if (line.startsWith("User-Agent: ")) {
    298                         line = "User-Agent: MYOB/6.66 (AN/ON)";
     326                        // always stripped, added back at the end
     327                        line = null;
     328                        continue;
     329                    } else if (line.startsWith("Accept")) {
     330                        // strip the accept-blah headers, as they vary dramatically from
     331                        // browser to browser
     332                        line = null;
     333                        continue;
    299334                    } else if (line.startsWith("Referer: ")) {
    300335                        // Shouldn't we be more specific, like accepting in-site referers ?
     
    314349               
    315350                if (line.length() == 0) {
     351                    newRequest.append("User-Agent: MYOB/6.66 (AN/ON)");
    316352                    newRequest.append("Connection: close\r\n\r\n");
    317353                    break;
  • apps/streaming/java/src/net/i2p/client/streaming/Connection.java

    r516d0b4 r610f1f7  
    338338    void resetReceived() {
    339339        _resetReceived = true;
    340         _outputStream.streamErrorOccurred(new IOException("Reset received"));
    341         _inputStream.streamErrorOccurred(new IOException("Reset received"));
     340        MessageOutputStream mos = _outputStream;
     341        MessageInputStream mis = _inputStream;
     342        if (mos != null)
     343            mos.streamErrorOccurred(new IOException("Reset received"));
     344        if (mis != null)
     345            mis.streamErrorOccurred(new IOException("Reset received"));
    342346        _connectionError = "Connection reset";
    343347        synchronized (_connectLock) { _connectLock.notifyAll(); }
  • history.txt

    r516d0b4 r610f1f7  
    1 $Id: history.txt,v 1.89 2004/11/29 18:24:50 jrandom Exp $
     1$Id: history.txt,v 1.90 2004/11/30 18:41:52 jrandom Exp $
     2
     3* 2004-12-01  0.4.2.1 released
     4
     52004-12-01  jrandom
     6    * Strip out any of the Accept-* HTTP header lines, and always make sure to
     7      include the forged User-agent header.
     8    * Adjust the default read timeout on the eepproxy to 60s, unless
     9      overridden.
     10    * Minor tweak on stream shutdown.
    211
    3122004-11-30  jrandom
  • installer/install.xml

    r516d0b4 r610f1f7  
    55    <info>
    66        <appname>i2p</appname>
    7         <appversion>0.4.2</appversion>
     7        <appversion>0.4.2.1</appversion>
    88        <authors>
    99            <author name="I2P" email="support@i2p.net"/>
  • router/java/src/net/i2p/router/RouterVersion.java

    r516d0b4 r610f1f7  
    1616 */
    1717public class RouterVersion {
    18     public final static String ID = "$Revision: 1.94 $ $Date: 2004/11/29 18:24:49 $";
    19     public final static String VERSION = "0.4.2";
    20     public final static long BUILD = 7;
     18    public final static String ID = "$Revision: 1.95 $ $Date: 2004/11/30 18:41:51 $";
     19    public final static String VERSION = "0.4.2.1";
     20    public final static long BUILD = 0;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION);
Note: See TracChangeset for help on using the changeset viewer.