fixed broken linefeed after http header, added binary data support