protected void sendRequestHeaders(OutputStream os)
throws IOException
{
writeString(os, iRequestMethod);
os.write(32);
if(iHttpProxyHost != null)
writeString(os,
iUri.toString());
else
if(iUri.getQuery() != null)
{
writeString(os,
iUri.getPath());
os.write(63);
writeString(os,
iUri.getQuery());
} else
{
writeString(os,
iUri.getPath());
}
os.write(32);
os.write(VERSION);
os.write(CRLF);
iRequestProperties.put("Connection",
"close"); //默认会写成close
writeHeaders(os, iRequestProperties);
os.write(CRLF);
iState = 3;
}