for (int idx = 0; idx < hdrs.length; idx++)
{
if (idx != ct_idx && idx != ua_idx && idx != co_idx && idx != pc_idx && idx != ka_idx && idx != ex_idx
&& idx != te_idx && idx != ho_idx)
dataout.writeBytes(hdrs[idx].getName().trim() + ": " + hdrs[idx].getValue().trim() + "\r\n");
}
// Handle Content-type, Content-length and Expect headers
if (req.getData() != null || req.getStream() != null)