all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Seltenreich <seltenreich@gmx.de>
Subject: Re: Race condition in url-http.el
Date: Sat, 22 Apr 2006 18:45:44 +0200	[thread overview]
Message-ID: <878xpxy2x3.fsf@gate450.dyndns.org> (raw)
In-Reply-To: <87irp1y43e.fsf@gate450.dyndns.org> (Andreas Seltenreich's message of "Sat, 22 Apr 2006 18:20:21 +0200")

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: url-http.patch --]
[-- Type: text/x-patch, Size: 712 bytes --]

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))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

      reply	other threads:[~2006-04-22 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-22 16:20 Race condition in url-http.el Andreas Seltenreich
2006-04-22 16:45 ` Andreas Seltenreich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878xpxy2x3.fsf@gate450.dyndns.org \
    --to=seltenreich@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.