[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url-http: Unexpected reuse of connection
From: |
Magnus Henoch |
Subject: |
Re: url-http: Unexpected reuse of connection |
Date: |
Sun, 26 Nov 2006 14:25:32 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (berkeley-unix) |
Shun-ichi GOTO <address@hidden> 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