unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28515: [PATCH] fix url-current-object is undefined
@ 2017-09-19 13:39 Yuya Minami
  2017-09-25  7:20 ` bug#28515: 南 優也
  0 siblings, 1 reply; 3+ messages in thread
From: Yuya Minami @ 2017-09-19 13:39 UTC (permalink / raw)
  To: 28515; +Cc: Yuya Minami

`url-http-find-free-connection` using `url-current-object`, but this
variable is nil at this point.
---
 lisp/url/url-http.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 9e8c58b1cd..078106fb8d 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1249,9 +1249,10 @@ The return value of this function is the retrieval buffer."
 	 (nsm-noninteractive (or url-request-noninteractive
 				 (and (boundp 'url-http-noninteractive)
 				      url-http-noninteractive)))
-         (connection (url-http-find-free-connection (url-host url)
-                                                    (url-port url)
-                                                    gateway-method))
+         (connection (let ((url-current-object url))
+                       (url-http-find-free-connection (url-host url)
+                                                      (url-port url)
+                                                      gateway-method)))
          (mime-accept-string url-mime-accept-string)
 	 (buffer (or retry-buffer
 		     (generate-new-buffer
--
2.14.1






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#28515:
  2017-09-19 13:39 bug#28515: [PATCH] fix url-current-object is undefined Yuya Minami
@ 2017-09-25  7:20 ` 南 優也
  2017-09-30 13:35   ` bug#28515: Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: 南 優也 @ 2017-09-25  7:20 UTC (permalink / raw)
  To: 28515

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

additional information:
`url-http` calls `url-http-find-free-connection` before `(setq url-current-object url)` and `url-http-find-free-connection` calls `url-open-stream` and `url-open-stream` referencing `url-current-object` before `url-http` updates it's value.
when `url-open-stream` referencing `url-current-object`, it's value is `nil` or old `url-current-object`.

so, let `url-current-object` to `url` in `url-http` before calling `url-http-find-free-connection`.

[-- Attachment #2.1: Type: text/html, Size: 552 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#28515:
  2017-09-25  7:20 ` bug#28515: 南 優也
@ 2017-09-30 13:35   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2017-09-30 13:35 UTC (permalink / raw)
  To: 南 優也; +Cc: 28515-done

> From: 南 優也 <yuya373@me.com>
> Date: Mon, 25 Sep 2017 07:20:27 +0000 (GMT)
> 
> additional information:
> `url-http` calls `url-http-find-free-connection` before `(setq url-current-object url)` and `url-http-find-free-connection` calls `url-open-stream` and `url-open-stream` referencing `url-current-object` before `url-http` updates it's value.
> when `url-open-stream` referencing `url-current-object`, it's value is `nil` or old `url-current-object`.
> 
> so, let `url-current-object` to `url` in `url-http` before calling `url-http-find-free-connection`.

Thanks, I fixed this on the emacs-26 branch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-30 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 13:39 bug#28515: [PATCH] fix url-current-object is undefined Yuya Minami
2017-09-25  7:20 ` bug#28515: 南 優也
2017-09-30 13:35   ` bug#28515: Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).