* I2PTunnelHTTPClient: Don't use BufferedReader

This commit is contained in:
zzz
2010-07-03 13:41:24 +00:00
parent cd7a41924d
commit 6435514e0d
2 changed files with 7 additions and 5 deletions

View File

@ -33,7 +33,6 @@ import net.i2p.data.Destination;
import net.i2p.util.EventDispatcher; import net.i2p.util.EventDispatcher;
import net.i2p.util.FileUtil; import net.i2p.util.FileUtil;
import net.i2p.util.Log; import net.i2p.util.Log;
import net.i2p.util.Translate; import net.i2p.util.Translate;
/** /**
@ -772,11 +771,12 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
_s = s; _s = s;
} }
String readLine(String method) throws IOException { String readLine(String method) throws IOException {
if (method == null || "POST".equals(method)) // Use unbuffered until we can find a BufferedReader that limits line length
//if (method == null || "POST".equals(method))
return DataHelper.readLine(_s); return DataHelper.readLine(_s);
if (_br == null) //if (_br == null)
_br = new BufferedReader(new InputStreamReader(_s, "ISO-8859-1")); // _br = new BufferedReader(new InputStreamReader(_s, "ISO-8859-1"));
return _br.readLine(); //return _br.readLine();
} }
} }

View File

@ -144,6 +144,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
} }
public void run() { public void run() {
// Todo: Don't use BufferedReader - IRC spec limits line length to 512 but...
BufferedReader in; BufferedReader in;
OutputStream output; OutputStream output;
try { try {
@ -218,6 +219,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
} }
public void run() { public void run() {
// Todo: Don't use BufferedReader - IRC spec limits line length to 512 but...
BufferedReader in; BufferedReader in;
OutputStream output; OutputStream output;
try { try {