new parent version
fix for issue 181, avoid creation of input stream ifcontentlength is zero