Hello,
Can you say me, where I make a mistake.
I am writing a proxy.When I read from InputStream in,
like:
try {
byte[] buf = new byte[4096];
int bytesIn = 0;
while (((bytesIn = in.read(buf)) >= 0))
{
String sss1 = new String(buf);
out.write(buf, 0, bytesIn);
}
} catch (Exception e) {
String errMsg = "Error getting HTTP body: " + e;
debugOut.printl n(errMsg);
}
So,when I look in sss1 contents,there have extra information like:
3
79
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
3a
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
2d
The result is incorect page displaying.
Can you say me, where I make a mistake.
Or how I can remove this extra information, so that page can to display corect in the browser.
Can you say me, where I make a mistake.
I am writing a proxy.When I read from InputStream in,
like:
try {
byte[] buf = new byte[4096];
int bytesIn = 0;
while (((bytesIn = in.read(buf)) >= 0))
{
String sss1 = new String(buf);
out.write(buf, 0, bytesIn);
}
} catch (Exception e) {
String errMsg = "Error getting HTTP body: " + e;
debugOut.printl n(errMsg);
}
So,when I look in sss1 contents,there have extra information like:
3
79
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
3a
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
2d
The result is incorect page displaying.
Can you say me, where I make a mistake.
Or how I can remove this extra information, so that page can to display corect in the browser.
Comment