Skip to content

Commit 07be992

Browse files
committed
New configuration option Disable_Program_Ini.
Add corresponding documentation. Part of T530-009.
1 parent fd9b020 commit 07be992

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

docs/build.adb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2018, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it --
77
-- under terms of the GNU General Public License as published by the --
@@ -144,6 +144,7 @@ begin
144144
Add ("SESSION_ID_LENGTH", Default.Session_Id_Length);
145145
Add ("TLS_TICKET_SUPPORT", Default.TLS_Ticket_Support);
146146
Add ("CONFIG_DIRECTORY", Default.Config_Directory);
147+
Add ("DISABLE_PROGRAM_INI", Default.Disable_Program_Ini);
147148
Add ("USER_AGENT", Default.User_Agent);
148149
Add ("SERVER_HEADER", Default.Server_Header);
149150
Text_IO.Put_Line ("""""""");

docs/source/using_aws.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,17 @@ Current supported options are:
862862
Specify the filename for the directory browser template page. The
863863
default value is |DIRECTORY_BROWSER_PAGE|.
864864

865+
*Disable_Program_Ini (boolean)*
866+
867+
.. index:: Disable_Program_Ini
868+
869+
Specify whether the configuration file :file:`program_name.ini` should be
870+
parsed or not. If this option is set to FALSE the program specific
871+
configuration file won't be parsed. This may be useful if another
872+
application is using such a file and cannot be shared. This setting
873+
is expected to be set in :file:`aws.ini` before the :file:`program_name.ini`
874+
file is parsed. The default value is |DISABLE_PROGRAM_INI|.
875+
865876
*Down_Image (string)*
866877

867878
.. index:: Down_Image

src/core/aws-config.adb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2019, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -237,6 +237,15 @@ package body AWS.Config is
237237
return To_String (O.P (Directory_Browser_Page).Str_Value);
238238
end Directory_Browser_Page;
239239

240+
-------------------------
241+
-- Disable_Program_Ini --
242+
-------------------------
243+
244+
function Disable_Program_Ini return Boolean is
245+
begin
246+
return Process_Options (Disable_Program_Ini).Bool_Value;
247+
end Disable_Program_Ini;
248+
240249
----------------
241250
-- Down_Image --
242251
----------------

src/core/aws-config.ads

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2019, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -382,6 +382,9 @@ package AWS.Config is
382382
function Config_Directory return String with Inline;
383383
-- Directory where AWS parameter files are located
384384

385+
function Disable_Program_Ini return Boolean with Inline;
386+
-- Whether the <program_name>.ini file should be read
387+
385388
function Transient_Cleanup_Interval return Duration with Inline;
386389
-- Number of seconds between each run of the cleaner task to remove
387390
-- transient pages.
@@ -520,6 +523,7 @@ private
520523
Session_Cleaner_Priority,
521524
Service_Priority,
522525
Config_Directory,
526+
Disable_Program_Ini,
523527
User_Agent,
524528
Transient_Cleanup_Interval,
525529
Transient_Lifetime,
@@ -796,6 +800,9 @@ private
796800
Config_Directory =>
797801
(Str, +Default.Config_Directory),
798802

803+
Disable_Program_Ini =>
804+
(Bool, Default.Disable_Program_Ini),
805+
799806
User_Agent =>
800807
(Str, +Default.User_Agent),
801808

src/core/aws-default.ads

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Ada Web Server --
33
-- --
4-
-- Copyright (C) 2000-2019, AdaCore --
4+
-- Copyright (C) 2000-2020, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify --
77
-- it under terms of the GNU General Public License as published by the --
@@ -157,6 +157,7 @@ package AWS.Default with Pure is
157157
Security : constant Boolean := False;
158158
Security_Mode : constant String := "TLS";
159159
Config_Directory : constant String := ".config/ada-web-srv";
160+
Disable_Program_Ini : constant Boolean := False;
160161
Cipher_Priorities : constant String := "";
161162
TLS_Ticket_Support : constant Boolean := False;
162163
Certificate : constant String := "cert.pem";

0 commit comments

Comments
 (0)