http: remove the trailing \n from ctime_r