I'm not sure this works as expected if we already have \r\n: we'll end up with \r\r\n.