all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Magnus Henoch <mange@freemail.hu>
Subject: Re: url-http: Unexpected reuse of connection
Date: Sun, 26 Nov 2006 14:25:32 +0100	[thread overview]
Message-ID: <873b86mjar.fsf@freemail.hu> (raw)
In-Reply-To: u4pt12ysf.wl%gotoh@taiyo.co.jp

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

> I experienced unexpected (invalid) re-use of connection on accessing
> via proxy server.
>
> When we use url function with proxy, request is made with
> "Connection: close", but url-http-parse-header<f> close connection 
> only if
>
>  "Connection:" header is in response
>  AND
>  its value is "close".
>
> I think it should be corrected to:
>
>  "Connection:" header is NOT in response
>  OR
>  its value is "close".
>
> In actual case, my proxy server doesn't return "Connection" header.
> Therefore, url-http-parse-header<f> leaves the connection.
> Then url-http-find-free-connection<f> find and reuse the connection
> when its sentinel is not yet run (process status is 'open).
> Finaly, 2nd url-retrieve<f> call very after 1st call
> sends request into closed (not sentinel'ed) connection, and fail.

This varies by HTTP version.  It seems to me that your proxy server
uses HTTP 1.0, and therefore doesn't send "Connection: close", since
keeping the connection alive is not the default.  I just committed a
patch that makes the behavior depend on HTTP version.  Does it fix
your problem?

Magnus

      reply	other threads:[~2006-11-26 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15  3:07 url-http: Unexpected reuse of connection Shun-ichi GOTO
2006-11-26 13:25 ` Magnus Henoch [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=873b86mjar.fsf@freemail.hu \
    --to=mange@freemail.hu \
    /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.