SLOWCLOSE (JANUS DEFINE parameter): Difference between revisions
m (minor formatting) |
|||
Line 6: | Line 6: | ||
==Description== | ==Description== | ||
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 <var class="product">Janus Web Server</var> | 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 (nowadays they almost certainly aren't), and <var class="product">Janus Web Server</var> has not read them from TCP/IP (back when this used to happen most of the time they would be in the data Janus has already read) Janus has no way of knowing if these junk characters follow. And, if that's the case (this probably just doesn't happen anymore) then under certain conditions TCP/IP will discard outgoing data from <var class="product">Janus Web Server</var> when a normal close is done on the socket. To prevent losing this data in this case, <var class="product">Janus Web Server</var> must perform a more complex and so "slower" and, not incidentally, more expensive close for the connection. | ||
This parameter defaults to <code>X'01'</code>. However: | This parameter defaults to <code>X'01'</code>. However: | ||
<p class="note"><b>Note:</b> With the passage of time, <var>SLOWCLOSE</var> processing has | <p class="note"><b>Note:</b> With the passage of time, <var>SLOWCLOSE</var> processing has become an anachronism, and setting it to 0 on Janus Web ports is recommended.</p> | ||
While the default setting covers the known browser bug which only seems to occur on POSTs, <var>SLOWCLOSE</var> 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: | While the default setting covers the known browser bug which only seems to occur on POSTs, <var>SLOWCLOSE</var> 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: | ||
Line 17: | Line 17: | ||
<tr class="head"><th>Bit</th><th>Meaning</th> | <tr class="head"><th>Bit</th><th>Meaning</th> | ||
<tr><th>X'01'</th> | <tr><th>X'01'</th> | ||
<td>Perform "slow" close processing for a POST, and only | <td>Perform "slow" close processing for a POST, if and only if Janus Web has not already received an extra carriage-return and line-feed. This is the default value. </td></tr> | ||
<tr><th>X'02'</th> | <tr><th>X'02'</th> | ||
<td> | <td>Perform "slow" close processing for a GET, if and only if Janus Web has not already received an extra carriage-return and line-feed.</td></tr> | ||
<tr><th>X'04'</th> | <tr><th>X'04'</th> | ||
<td> | <td>Perform "slow" close processing for a PUT, if and only if Janus Web has not already received an extra carriage-return and line-feed.</td></tr> | ||
<tr><th>X'10'</th> | <tr><th>X'10'</th> | ||
<td> | <td>Always do a slow close for a POST.</td></tr> | ||
<tr><th>X'20'</th> | <tr><th>X'20'</th> | ||
<td> | <td>Always do a slow close for a GET.</td></tr> | ||
<tr><th>X'40'</th> | <tr><th>X'40'</th> | ||
<td> | <td>Always do a slow close for a PUT. | ||
</td></tr> | </td></tr> | ||
</table> | </table> |
Revision as of 14:38, 15 March 2017
SLOWCLOSE mask — Don't be hasty closing connections
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.
Description
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 (nowadays they almost certainly aren't), and Janus Web Server has not read them from TCP/IP (back when this used to happen most of the time they would be in the data Janus has already read) Janus has no way of knowing if these junk characters follow. And, if that's the case (this probably just doesn't happen anymore) 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'
. However:
Note: With the passage of time, SLOWCLOSE processing has become an anachronism, and setting it to 0 on Janus Web ports is recommended.
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:
Bit | Meaning |
---|---|
X'01' | Perform "slow" close processing for a POST, if and only if Janus Web has not already received an extra carriage-return and line-feed. This is the default value. |
X'02' | Perform "slow" close processing for a GET, if and only if Janus Web has not already received an extra carriage-return and line-feed. |
X'04' | Perform "slow" close processing for a PUT, if and only if Janus Web has not already received an extra carriage-return and line-feed. |
X'10' | Always do a slow close for a POST. |
X'20' | Always do a slow close for a GET. |
X'40' | Always do a slow close for a PUT. |
Valid only for WEBSERV ports.