on PUT seek to beginning of file on retry; fdopen does not do this