W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2005

RE: Turn persistent connections OFF

From: Sinha, Raj \(Raj\) <rajsinha@avaya.com>
Date: Thu, 28 Apr 2005 10:16:34 -0400
Message-ID: <8CA1128D59AD27429985B397118CEDDF05372F2F@nj7460avexu1.global.avaya.com>
To: "Steinar Bang" <sb@dod.no>, <www-lib@w3.org>

Maybe this does the trick... still trying 

HTRequest_addConnection(request, "close", "");

Instead of 
HTRequest_addConnection(request, "Keep-Alive", "");

Read http specs and this what it says

14.10 Connection
The Connection general-header field allows the sender to specify options
that are desired for that particular connection and MUST NOT be
communicated by proxies over further connections. 

The Connection header has the following grammar: 

       Connection = "Connection" ":" 1#(connection-token)
       connection-token  = token

HTTP/1.1 proxies MUST parse the Connection header field before a message
is forwarded and, for each connection-token in this field, remove any
header field(s) from the message with the same name as the
connection-token. Connection options are signaled by the presence of a
connection-token in the Connection header field, not by any
corresponding additional header field(s), since the additional header
field may not be sent if there are no parameters associated with that
connection option. 

Message headers listed in the Connection header MUST NOT include
end-to-end headers, such as Cache-Control. 

HTTP/1.1 defines the "close" connection option for the sender to signal
that the connection will be closed after completion of the response. For

       Connection: close

in either the request or the response header fields indicates that the
connection SHOULD NOT be considered `persistent' (section 8.1) after the
current request/response is complete. 

HTTP/1.1 applications that do not support persistent connections MUST
include the "close" connection option in every message. 

A system receiving an HTTP/1.0 (or lower-version) message that includes
a Connection header MUST, for each connection-token in this field,
remove and ignore any header field(s) from the message with the same
name as the connection-token. This protects against mistaken forwarding
of such header fields by pre-HTTP/1.1 proxies. See section 19.6.2. 

Raj Sinha |
Enterprise Communication Appliance Solutions | 
Avaya | 307 Middletown-Lincroft Road | 
Room 1H 318 B | Lincroft, NJ 07738 | 
732-852-2077| rajsinha@avaya.com

-----Original Message-----
From: www-lib-request@w3.org [mailto:www-lib-request@w3.org] On Behalf
Of Steinar Bang
Sent: Thursday, April 28, 2005 9:55 AM
To: www-lib@w3.org
Subject: Re: Turn persistent connections OFF

>>>>> "Sinha, Raj \(Raj\)" <rajsinha@avaya.com>:

> Or in short...I have a requirement that tells me to close the
> connection right after the request is complete. How Can I do this?

Only way I can think about, is to make the client use HTTP version 1.0
instead of 1.1.  But I don't think there is any API to set this on
Received on Thursday, 28 April 2005 14:17:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:56 UTC