buf fix

fix bug in copy2buffer where the endchars were only checked once
add '\r' to be a line feed character in http parser