use line buffer to write lines (TODO: line_buffer is member of request so you shouldn't need to pass it as an argument)