all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [gotoh@taiyo.co.jp: url-gw.el: Cannot use proxy with url-gw.el 1.15]
@ 2006-11-09  0:54 Richard Stallman
  2006-11-09  2:23 ` Chong Yidong
  2006-11-09  2:24 ` url-gw.el: Cannot use proxy with url-gw.el 1.15 Chong Yidong
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Stallman @ 2006-11-09  0:54 UTC (permalink / raw)


Would someone please DTRT and then ack?

------- Start of forwarded message -------
To: emacs-pretest-bug@gnu.org
From: Shun-ichi GOTO <gotoh@taiyo.co.jp>
Date: Wed, 08 Nov 2006 17:52:20 +0900
Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Subject: url-gw.el: Cannot use proxy with url-gw.el 1.15
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

Url package in cvs head cannot use http proxy.
# gateway method is default (native).

For example, this simple code fail with url-gw.el rev 1.15
 (url-retrieve "http://www.gnu.org/" 'ignore))
but success with url-gw.el rev 1.14.

With rev 1.15, url-retrieve<f> issue GET requests
  GET http://zippo:8080/...       (incorrect!)
against proxy server instead of
  GET http://www.gnu.org/...      (correct)

 (Note: zippo:8080 is proxy in my local net)

I don't know why changes between two revs cause so.

- --- Regards,
 Shun-ichi Goto  <gotoh@taiyo.co.jp>
   R&D Group, TAIYO Corp., Tokyo, JAPAN







_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

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

* Re: [gotoh@taiyo.co.jp: url-gw.el: Cannot use proxy with url-gw.el 1.15]
  2006-11-09  0:54 [gotoh@taiyo.co.jp: url-gw.el: Cannot use proxy with url-gw.el 1.15] Richard Stallman
@ 2006-11-09  2:23 ` Chong Yidong
  2006-11-09  2:24 ` url-gw.el: Cannot use proxy with url-gw.el 1.15 Chong Yidong
  1 sibling, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2006-11-09  2:23 UTC (permalink / raw)
  Cc: emacs-devel

> From: Shun-ichi GOTO <gotoh@taiyo.co.jp>
> Subject: url-gw.el: Cannot use proxy with url-gw.el 1.15
> To: emacs-pretest-bug@gnu.org
>
> Url package in cvs head cannot use http proxy.
> # gateway method is default (native).
>
> For example, this simple code fail with url-gw.el rev 1.15
>  (url-retrieve "http://www.gnu.org/" 'ignore))
> but success with url-gw.el rev 1.14.
>
> With rev 1.15, url-retrieve<f> issue GET requests
>   GET http://zippo:8080/...       (incorrect!)
> against proxy server instead of
>   GET http://www.gnu.org/...      (correct)
>
>  (Note: zippo:8080 is proxy in my local net)

I don't know if this is directly related, but in url-gw.el:252,

    (setq conn (case gw-method
		 (tls
		  (open-tls-stream name buffer host service))
		 (ssl
		  (open-ssl-stream name buffer host service))
		 ((native)
		  ;; Use non-blocking socket if we can.
		  (make-network-process :name name :buffer buffer

shouldn't `(native)' be replaced by `native'?

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

* Re: url-gw.el: Cannot use proxy with url-gw.el 1.15
  2006-11-09  0:54 [gotoh@taiyo.co.jp: url-gw.el: Cannot use proxy with url-gw.el 1.15] Richard Stallman
  2006-11-09  2:23 ` Chong Yidong
@ 2006-11-09  2:24 ` Chong Yidong
  2006-11-09  3:06   ` Shun-ichi GOTO
  1 sibling, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2006-11-09  2:24 UTC (permalink / raw)
  Cc: emacs-devel

Does this patch solve the problem?

*** emacs/lisp/url/url-gw.el.~1.15.~	2006-10-29 16:23:31.000000000 -0500
--- emacs/lisp/url/url-gw.el	2006-11-08 21:23:53.000000000 -0500
***************
*** 249,255 ****
  			  (open-tls-stream name buffer host service))
  			 (ssl
  			  (open-ssl-stream name buffer host service))
! 			 ((native)
  			  ;; Use non-blocking socket if we can.
  			  (make-network-process :name name :buffer buffer
  						:host host :service service
--- 249,255 ----
  			  (open-tls-stream name buffer host service))
  			 (ssl
  			  (open-ssl-stream name buffer host service))
! 			 (native
  			  ;; Use non-blocking socket if we can.
  			  (make-network-process :name name :buffer buffer
  						:host host :service service

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

* Re: url-gw.el: Cannot use proxy with url-gw.el 1.15
  2006-11-09  2:24 ` url-gw.el: Cannot use proxy with url-gw.el 1.15 Chong Yidong
@ 2006-11-09  3:06   ` Shun-ichi GOTO
  2006-11-09  9:23     ` Shun-ichi GOTO
  0 siblings, 1 reply; 6+ messages in thread
From: Shun-ichi GOTO @ 2006-11-09  3:06 UTC (permalink / raw)
  Cc: emacs-devel

On 11/9/06, Chong Yidong <cyd@stupidchicken.com> wrote:
> Does this patch solve the problem?

No. It didn't.

'native case is always run.
The problem comes when :no-wait of make-network-process<f> is t,
Good if it is nil.
(featurep ...) is t on my environment (Debian sarge).
By replacing (featurep ...) with nil, all is well.
but set t, NG.

-- 
Shun-ichi GOTO

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

* Re: url-gw.el: Cannot use proxy with url-gw.el 1.15
  2006-11-09  3:06   ` Shun-ichi GOTO
@ 2006-11-09  9:23     ` Shun-ichi GOTO
  2006-11-10 17:09       ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Shun-ichi GOTO @ 2006-11-09  9:23 UTC (permalink / raw)



>> Does this patch solve the problem?
>
> No. It didn't.

I found the bug (maybe).
Is this correct?
Anyway, I got expected response with this patch.

Last one fixes my problem.
1st and 2nd is not required for my problem, but I guess it is required
generaly. And also some more files have a code checking process status.


Index: url-http.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-http.el,v
retrieving revision 1.40
diff -u -r1.40 url-http.el
--- url-http.el	8 Nov 2006 20:34:36 -0000	1.40
+++ url-http.el	9 Nov 2006 09:17:50 -0000
@@ -92,7 +92,7 @@
 
 (defun url-http-mark-connection-as-free (host port proc)
   (url-http-debug "Marking connection as free: %s:%d %S" host port proc)
-  (when (memq (process-status proc) '(open run))
+  (when (memq (process-status proc) '(open run connect))
     (set-process-buffer proc nil)
     (set-process-sentinel proc 'url-http-idle-sentinel)
     (puthash (cons host port)
@@ -104,7 +104,7 @@
   (let ((conns (gethash (cons host port) url-http-open-connections))
 	(found nil))
     (while (and conns (not found))
-      (if (not (memq (process-status (car conns)) '(run open)))
+      (if (not (memq (process-status (car conns)) '(run open connect)))
 	  (progn
 	    (url-http-debug "Cleaning up dead process: %s:%d %S"
 			    host port (car conns))
@@ -1144,7 +1144,7 @@
     (cond
      ((string= (substring why 0 4) "open")
       (set-process-sentinel proc 'url-http-end-of-document-sentinel)
-      (process-send-string proc (url-http-create-request url-current-object)))
+      (process-send-string proc (url-http-create-request url-http-target-url)))
      (t
       (setf (car url-callback-arguments)
 	    (nconc (list :error (list 'error 'connection-failed why


--- Regards,
 Shun-ichi Goto  <gotoh@taiyo.co.jp>
   R&D Group, TAIYO Corp., Tokyo, JAPAN

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

* Re: url-gw.el: Cannot use proxy with url-gw.el 1.15
  2006-11-09  9:23     ` Shun-ichi GOTO
@ 2006-11-10 17:09       ` Chong Yidong
  0 siblings, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2006-11-10 17:09 UTC (permalink / raw)
  Cc: emacs-devel

Shun-ichi GOTO <gotoh@taiyo.co.jp> writes:

> I found the bug (maybe).
> Is this correct?
> Anyway, I got expected response with this patch.

Looks correct.  I checked it in.  Thanks!

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

end of thread, other threads:[~2006-11-10 17:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-09  0:54 [gotoh@taiyo.co.jp: url-gw.el: Cannot use proxy with url-gw.el 1.15] Richard Stallman
2006-11-09  2:23 ` Chong Yidong
2006-11-09  2:24 ` url-gw.el: Cannot use proxy with url-gw.el 1.15 Chong Yidong
2006-11-09  3:06   ` Shun-ichi GOTO
2006-11-09  9:23     ` Shun-ichi GOTO
2006-11-10 17:09       ` Chong Yidong

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.