From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Network security manager Date: Fri, 21 Nov 2014 12:12:04 +0100 Message-ID: References: <87a93oh180.fsf@lifelogs.com> <83h9xw9zg3.fsf@gnu.org> <83d28k9yb9.fsf@gnu.org> <83ppcj9740.fsf@gnu.org> <83k32r89rd.fsf@gnu.org> <83tx1t6dv6.fsf@gnu.org> <83y4r53reb.fsf@gnu.org> <83fvdc51sq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416568366 12868 80.91.229.3 (21 Nov 2014 11:12:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 11:12:46 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 21 12:12:41 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xrm8m-00057I-Sj for ged-emacs-devel@m.gmane.org; Fri, 21 Nov 2014 12:12:41 +0100 Original-Received: from localhost ([::1]:40038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrm8m-0003Oj-4f for ged-emacs-devel@m.gmane.org; Fri, 21 Nov 2014 06:12:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrm8e-0003OZ-3I for emacs-devel@gnu.org; Fri, 21 Nov 2014 06:12:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrm8Z-0005Wy-7E for emacs-devel@gnu.org; Fri, 21 Nov 2014 06:12:32 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:51283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrm8Y-0005TK-TT; Fri, 21 Nov 2014 06:12:27 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xrm8C-0000Cj-VQ; Fri, 21 Nov 2014 12:12:05 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUsJhMXEgf+//qlikng 0bH///9KRjaDZzX+//b+/faqSZjFAAACR0lEQVQ4jY2TMW/bMBCFj6hBryRauLsTA+1MVkTHQnQE rao1aLPhgEI3owrI3agBz4nURv+2d5Qcu3UK9A2ixI/vyDvq4GjzMmpRFOViPuh4PMKx78tR/WP5 ogL2J0dptcrPBPbt+NVnTZMuL8DTAIrMTIN66M6hxj2eUhOCybqzYwSpQtCk+gzmcxorfdOYz7q1 L+AwvtzeWmt1nl+BymokdnntsDbP8/5i8/J1/TdYXIOKwqe6GDHQkgpL0DoE1Q7q/MLRdqudlN/K 8tcaIObeDSDN042Abb5KAHiyxHp3Qx5K1TspJg83AeB9cm/yMcGVE9tEwnRyA8C23m0fR5BtZk4x cP4urLlyjn8aQHXHuNsmU5VXNmm8c+x+OFXrmXMueIp8h/Nuwzu6wRKP6kjNsl95cGtgfFnMCWwi WAdtswRHkPAdHQcCHEFttK0x0kaCfNdRqEoKTqSxKY2MMTmJe3yVQpJn5hUAOPqaLOi4PyVq5pyo MwQsLlsS+ILzggkBjhwCQLK3sYgRAInHJ2NiEjPPBrCGgVK0NxE87SQIBgwEJ4wJsslQErNBN0fi p36NNYRaR7AyASSHnQOu/DSEOjQDqFLjQ/ABk8dJVKN0TLBsVeIQUT1qY1xQ2FlFvEHqAAqR+Fqh Velu/HdTj7OqCQFXG4x0uvPyh0K7MhQmGKP04QSKNkWQ1LRaxUCnNihaa5Xy5FNje4/98RGJtujT 9vnwR+NUz31r+77Nj6e//dRRZfHhUOwXr7TB343z+C/Qk1p7pd8+SVpkEyH3FQAAAABJRU5ErkJg gg== X-Now-Playing: Matching Mole's _Matching Mole_: "Immediate Curtain" X-Hashcash: 1:23:141121:eliz@gnu.org::jLt8Nz4A21ck7rQK:000004Vyj X-Hashcash: 1:23:141121:monnier@iro.umontreal.ca::Raib50seMoz2YcSO:000000000000000000000000000000000000094go X-Hashcash: 1:23:141121:emacs-devel@gnu.org::NJyuAG4UKvDSwrM6:000000000000000000000000000000000000000000KrRR In-Reply-To: <83fvdc51sq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Nov 2014 11:40:53 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.51 (gnu/linux) X-MailScanner-ID: 1Xrm8C-0000Cj-VQ MailScanner-NULL-Check: 1417173125.55141@t0/8MMZwVogzEkSZQXePKQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177937 Archived-At: Eli Zaretskii writes: > Sorry, I don't follow: doesn't the code run from a process filter? If > not, what do you mean by "asynchronously" here? It depends on what you mean by "the code". This is a call to `url-retrieve': (url-retrieve "https://google.com" (lambda (&rest) (application-code))) It's the same code used "interactively" (i.e., saying `M-x eww') as when eww is inserting images into the buffer after it's been generated (this is the really asynchronous bits where we don't want any prompting in eww, because it's just too annoying). The prompting we're talking about here is done from `nsm-verify-connection'. This is the stack trace for `M-x eww RET https://google.com', and it's synchronous, and prompting is a-ok: Debugger entered--entering a function: * nsm-verify-connection(# "google.com" 443) network-stream-open-tls("google.com" # "google.com" 443 (:type tls :nowait t)) open-network-stream("google.com" # "google.com" 443 :type tls :nowait t) [...] url-retrieve("https://google.com/" eww-render ("https://google.com/")) eww("https://google.com") call-interactively(eww record nil) command-execute(eww record) execute-extended-command(nil "eww") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) But then, since we get a redirect to www.google.com, we get a new `open-network-stream': Debugger entered--entering a function: * nsm-verify-connection(# "www.google.no" 443) network-stream-open-tls("www.google.no" # "www.google.no" 443 (:type tls :nowait t)) open-network-stream("www.google.no" # "www.google.no" 443 :type tls :nowait t) [...] url-http-content-length-after-change-function(221 479 258) url-http-wait-for-headers-change-function(1 487 486) url-http-generic-filter() And that one is asynchronous, but should (in this instance) also be allowed to prompt, since a redirect is an implementation detail the user shouldn't know or care about. But now we're asynchronous mode, and the user may have decided to do something else where prompting would be ungood. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no