From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.devel Subject: Re: Race condition in url-http.el Date: Sat, 22 Apr 2006 18:45:44 +0200 Message-ID: <878xpxy2x3.fsf@gate450.dyndns.org> References: <87irp1y43e.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1145724374 21409 80.91.229.2 (22 Apr 2006 16:46:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2006 16:46:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 22 18:46:11 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FXLFC-0003B2-T7 for ged-emacs-devel@m.gmane.org; Sat, 22 Apr 2006 18:46:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXLFC-0000mt-EP for ged-emacs-devel@m.gmane.org; Sat, 22 Apr 2006 12:46:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FXLF0-0000mK-R0 for emacs-devel@gnu.org; Sat, 22 Apr 2006 12:45:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FXLEy-0000m8-Uj for emacs-devel@gnu.org; Sat, 22 Apr 2006 12:45:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXLEy-0000m5-Pl for emacs-devel@gnu.org; Sat, 22 Apr 2006 12:45:48 -0400 Original-Received: from [129.13.185.218] (helo=smtp2.rz.uni-karlsruhe.de) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FXLGn-0004Bh-Ar for emacs-devel@gnu.org; Sat, 22 Apr 2006 12:47:41 -0400 Original-Received: from rzstud1.stud.uni-karlsruhe.de (rzstud1.stud.uni-karlsruhe.de [193.196.41.33]) by smtp2.rz.uni-karlsruhe.de with esmtp (Exim 4.50 #1) id 1FXLEw-0000h9-Qp; Sat, 22 Apr 2006 18:45:46 +0200 Original-Received: from uwi7 by rzstud1.stud.uni-karlsruhe.de with local (Exim 3.36 #1) id 1FXLF3-0004B9-00 for emacs-devel@gnu.org; Sat, 22 Apr 2006 18:45:53 +0200 Original-To: emacs-devel@gnu.org X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-, PnG. Et.Yh (Andreas Seltenreich's message of "Sat, 22 Apr 2006 18:20:21 +0200") User-Agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53239 Archived-At: --=-=-= Andreas Seltenreich schrob: > The attached patch seems to fix it. I'm not sure if it is the right > way to fix it, but the sentinel seems to do proper cleanup after the > delete-process on the network connection. Oops, this will break if there's no "Connection" header at all. Attached is an updated version. Thanks, andreas --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=url-http.patch Index: url-http.el =================================================================== RCS file: /sources/emacs/emacs/lisp/url/url-http.el,v retrieving revision 1.28 diff -c -r1.28 url-http.el *** url-http.el 7 Mar 2006 17:21:16 -0000 1.28 --- url-http.el 22 Apr 2006 16:38:32 -0000 *************** *** 386,391 **** --- 386,395 ---- (url-http-parse-response) (mail-narrow-to-head) ;;(narrow-to-region (point-min) url-http-end-of-headers) + (let ((connection (mail-fetch-field "Connection"))) + (if (and connection + (string= (downcase connection) "close")) + (delete-process url-http-process))) (let ((class nil) (success nil)) (setq class (/ url-http-response-status 100)) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--