I've been working with the web server in v15.4 and playing with WEB SET
OPTION and WEB GET OPTION.
I wrote a method to retrieve a list of settings from the server. The method
executes on the server and stores the options in a c-obj. I changed some
things on the server and the changes were reflected the next time I ran the
method. Worked fine.
When I moved on to writing a setter method. I notice some options either
don't change or the database settings panel shows different values.
Specifically Web inactive process timeout.
I can use WEB SET OPTION to set a value and that value is returned if I use
my get options method. But if I go to the actual server and look at the
same setting in the settings form it's different. And if I change the value
there it doesn't reflect in my get options method.
I tried restarting the web server when making changes but that didn't seem
to matter.
So, I must be confused about some aspect of this. Here's hoping someone can
point me in the right direction.
FYI - here are the methods I'm using;
// Web_GET_serverOptions ** EOS **
// Written by: Kirk as Designer, Created: 03/05/17, 14:08:02
// ------------------
// Method: Web_GET_serverOptions (pointer)
// $1 is pointer to c-obj for options
// Purpose: get the web server options from the server
C_POINTER($1)
C_LONGINT($i)
C_TEXT($text)
C_OBJECT($obj)
$obj:=JSON Parse("{}")
WEB GET OPTION(0;$i)
OB SET($obj;"wdl-disable";$i)
WEB GET OPTION(wdl enable with all body parts;$i)
OB SET($obj;"wdl-enable-with-all-body-parts";$i)
WEB GET OPTION(wdl enable with request body;$i)
OB SET($obj;"wdl-enable-with-request-body";$i)
WEB GET OPTION(wdl enable with response body;$i)
OB SET($obj;"wdl-enable-with-response-body";$i)
WEB GET OPTION(wdl enable without body;$i)
OB SET($obj;"wdl-enable-without-body";$i)
WEB GET OPTION(Web character set;$text)
OB SET($obj;"Web-character-set";$text)
WEB GET OPTION(Web debug log;$i)
OB SET($obj;"Web-debug-log";$i)
WEB GET OPTION(Web HTTP compression level;$i)
OB SET($obj;"Web-HTTP-compression-level";$i)
WEB GET OPTION(Web HTTP compression threshold;$i)
OB SET($obj;"Web-HTTP-compression-threshold";$i)
WEB GET OPTION(Web HTTPS port ID;$i)
OB SET($obj;"Web-HTTPS-port-ID";$i)
WEB GET OPTION(Web inactive process timeout;$i)
OB SET($obj;"Web-inactive-process-timeout";$i)
WEB GET OPTION(Web inactive session timeout;$i)
OB SET($obj;"Web-inactive-session-timeout";$i)
WEB GET OPTION(Web IP address to listen;$text)
OB SET($obj;"Web-IP-address-to-listen";$text)
WEB GET OPTION(Web keep session;$i)
OB SET($obj;"Web-keep-session";$i)
WEB GET OPTION(Web log recording;$i)
OB SET($obj;"Web-log-recording";$i)
WEB GET OPTION(Web max concurrent processes;$i)
OB SET($obj;"Web-max-concurrent-processes";$i)
WEB GET OPTION(Web max sessions;$i)
OB SET($obj;"Web-max-sessions";$i)
WEB GET OPTION(Web maximum requests size;$i)
OB SET($obj;"Web-maximum-requests-size";$i)
WEB GET OPTION(Web Port ID;$i)
OB SET($obj;"Web-port-ID";$i)
WEB GET OPTION(Web Session cookie domain;$text)
OB SET($obj;"Web-session-cookie-domain";$text)
WEB GET OPTION(Web session cookie name;$text)
OB SET($obj;"Web-session-cookie-name";$text)
WEB GET OPTION(Web Session cookie path;$text)
OB SET($obj;"Web-session-cookie-path";$text)
WEB GET OPTION(Web Session enable IP address validation;$i)
OB SET($obj;"Web-session-enable-IP-address-validation";$i)
$1->:=$obj
/////////////////////////////////
// Web_SET_serverOptions ** EOS **
// Written by: Kirk as Designer, Created: 03/05/17, 14:39:20
// ------------------
// Method: Web_SET_serverOptions (pointer)
// $1 is obj of server opitons
// Purpose:
C_POINTER($1)
C_LONGINT($i)
C_TEXT($text)
C_OBJECT($obj)
$obj:=JSON Parse("{}")
$obj:=OB Copy($1->)
// --------------------------------------------------------
If (OB Is defined($obj;"wdl-disable"))
$i:=OB Get($obj;"wdl-disable")
WEB SET OPTION(0;$i)
End if
If (OB Is defined($obj;"wdl-enable-with-all-body-parts"))
$i:=OB Get($obj;"wdl-enable-with-all-body-parts")
WEB SET OPTION(wdl enable with all body parts;$i)
End if
If (OB Is defined($obj;"wdl-enable-with-request-body"))
$i:=OB Get($obj;"wdl-enable-with-request-body")
WEB SET OPTION(wdl enable with request body;$i)
End if
If (OB Is defined($obj;"wdl-enable-with-response-body"))
$i:=OB Get($obj;"wdl-enable-with-response-body")
WEB SET OPTION(wdl enable with response body;$i)
End if
If (OB Is defined($obj;"wdl-enable-without-body"))
$i:=OB Get($obj;"wdl-enable-without-body")
WEB SET OPTION(wdl enable without body;$i)
End if
If (OB Is defined($obj;"Web-character-set"))
$text:=OB Get($obj;"Web-character-set")
WEB SET OPTION(Web character set;$text)
End if
If (OB Is defined($obj;"Web-debug-log"))
$i:=OB Get($obj;"Web-debug-log")
WEB SET OPTION(Web debug log;$i)
End if
If (OB Is defined($obj;"Web-HTTP-compression-level"))
$i:=OB Get($obj;"Web-HTTP-compression-level")
WEB SET OPTION(Web HTTP compression level;$i)
End if
If (OB Is defined($obj;"Web-HTTP-compression-threshold"))
$i:=OB Get($obj;"Web-HTTP-compression-threshold")
WEB SET OPTION(Web HTTP compression threshold;$i)
End if
If (OB Is defined($obj;"Web-HTTPS-port-ID"))
$i:=OB Get($obj;"Web-HTTPS-port-ID")
WEB SET OPTION(Web HTTPS port ID;$i)
End if
If (OB Is defined($obj;"Web-inactive-process-timeout"))
$i:=OB Get($obj;"Web-inactive-process-timeout")
WEB SET OPTION(Web inactive process timeout;$i)
End if
If (OB Is defined($obj;"Web-inactive-session-timeout"))
$i:=OB Get($obj;"Web-inactive-session-timeout")
WEB SET OPTION(Web inactive session timeout;$i)
End if
If (OB Is defined($obj;"Web-IP-address-to-listen"))
$text:=OB Get($obj;"Web-IP-address-to-listen")
WEB SET OPTION(Web IP address to listen;$text)
End if
If (OB Is defined($obj;"Web-keep-session"))
$i:=OB Get($obj;"Web-keep-session")
WEB SET OPTION(Web keep session;$i)
End if
If (OB Is defined($obj;"Web-log-recording"))
$i:=OB Get($obj;"Web-log-recording")
WEB SET OPTION(Web log recording;$i)
End if
If (OB Is defined($obj;"Web-max-concurrent-processes"))
$i:=OB Get($obj;"Web-max-concurrent-processes")
WEB SET OPTION(Web max concurrent processes;$i)
End if
If (OB Is defined($obj;"Web-max-sessions"))
$i:=OB Get($obj;"Web-max-sessions")
WEB SET OPTION(Web max sessions;$i)
End if
If (OB Is defined($obj;"Web-maximum-requests-size"))
$i:=OB Get($obj;"Web-maximum-requests-size")
WEB SET OPTION(Web maximum requests size;$i)
End if
If (OB Is defined($obj;"Web-port-ID"))
$i:=OB Get($obj;"Web-port-ID")
WEB SET OPTION(Web Port ID;$i)
End if
If (OB Is defined($obj;"Web-session-cookie-domain"))
$text:=OB Get($obj;"Web-session-cookie-domain")
WEB SET OPTION(Web Session cookie domain;$text)
End if
If (OB Is defined($obj;"Web-session-cookie-name"))
$text:=OB Get($obj;"Web-session-cookie-name")
WEB SET OPTION(Web session cookie name;$text)
End if
If (OB Is defined($obj;"Web-session-cookie-path"))
$text:=OB Get($obj;"Web-session-cookie-path")
WEB SET OPTION(Web Session cookie path;$text)
End if
If (OB Is defined($obj;"Web-session-enable-IP-address-validation"))
$i:=OB Get($obj;"Web-session-enable-IP-address-validation")
WEB SET OPTION(Web Session enable IP address validation;$i)
End if
// --------------------------------------------------------
Web_GET_serverOptions (->$obj)
$1->:=$obj
--
Kirk Brooks
San Francisco, CA
=======================
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************