* I2PTunnelHTTPClient: Don't use BufferedReader
This commit is contained in:
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
Reference in New Issue
Block a user