SLOWCLOSE (JANUS DEFINE parameter): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />SLOWCLOSE mask -- don't be hasty closing connections.<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />SLOWCLOSE mask -- don't be hasty closing connections.<section end="desc" /></span>


<var>SLOWCLOSE</var> is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port. See the [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].
<var>SLOWCLOSE</var> is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port.  


The <var>SLOWCLOSE</var> parameter is followed by a bitmask that indicates the conditions under which ''[[Janus Web Server]]'' is to perform a "slow" close of a connection with a browser.  
The <var>SLOWCLOSE</var> parameter is followed by a bitmask that indicates the conditions under which ''[[Janus Web Server]]'' is to perform a "slow" close of a connection with a browser.  

Revision as of 22:33, 29 February 2012

<section begin="desc" />SLOWCLOSE mask -- don't be hasty closing connections.<section end="desc" />

SLOWCLOSE is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.

The SLOWCLOSE parameter is followed by a bitmask that indicates the conditions under which Janus Web Server is to perform a "slow" close of a connection with a browser.

This parameter is useful for dealing with a bug in some browsers that sends an extra, junk, carriage-return and line-feed character after the contents of an HTTP POST. If these two extra characters are sent by the browser, and Janus Web Server does not read them from TCP/IP (most of the time it will), then under certain conditions TCP/IP will discard outgoing data from Janus Web Server when a normal close is done on the socket. To prevent losing this data in this case, Janus Web Server must perform a more complex and so "slower" and, not incidentally, more expensive close for the connection.

This parameter defaults to X'01': Janus Web Server will only perform "slow" close processing for a POST, and only when it has not already received an extra carriage-return and line-feed.

While the default setting covers the known browser bug which only seems to occur on POSTs, SLOWCLOSE can be set to other values for other request types. These settings should only be necessary if browsers that send junk characters under other conditions are discovered:

X'02' Slow close for a GET that is followed by extra carriage-return and line-feed characters that are not read by the Web Server
X'04' Slow close for a PUT that is followed by extra carriage-return and line-feed characters that are not read
X'10' Slow close for a POST that is followed by extra carriage-return and line-feed characters, whether the characters are read by the Server or not
X'20' Slow close for a GET that is followed by extra carriage-return and line-feed characters, whether the characters are read or not
X'40' Slow close for a PUT that is followed by extra carriage-return and line-feed characters, whether the characters are read or not

Valid only for WEBSERV ports.

See also