http: Handle hangup writes more gently