This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit 9c680c8a5001cbb219765fc4c5c253be128132d3
Author: Massimo Manghi <mxman...@apache.org>
AuthorDate: Wed Jun 8 17:00:46 2022 +0200

    Directive HonorHeaderOnlyReqs renamed as HonorHeadRequests, which sounds 
more familiar with the common parlance regarding HTTP
---
 ChangeLog                              |  5 +++++
 doc/xml/commands.xml                   |  2 +-
 doc/xml/directives.xml                 |  4 ++--
 src/mod_rivet_ng/apache_config.c       | 12 +++++++-----
 src/mod_rivet_ng/mod_rivet.h           |  2 +-
 src/mod_rivet_ng/mod_rivet_generator.c |  2 +-
 src/mod_rivet_ng/rivetInspect.c        |  4 ++--
 7 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 773773d..cc8ab5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-31 Massimo Manghi <mxman...@apache.org>
+       * src/mod_rivet_ng/*.c: Directive HonorHeaderOnlyReqs renamed as
+       HonorHeadRequests, which sounds more consistent with the common 
parlance 
+       regarding HTTP
+
 2022-03-01 Massimo Manghi <mxman...@apache.org>
        * tests/getall.rvt: add new test for the 2 forms of [::rivet::var_qs 
all]
 
diff --git a/doc/xml/commands.xml b/doc/xml/commands.xml
index 0d29a34..c17668e 100644
--- a/doc/xml/commands.xml
+++ b/doc/xml/commands.xml
@@ -1004,7 +1004,7 @@ keyvalue_map(args) = 1 2 3 4 5</programlisting>
     "UploadDirectory",
     "UploadFilesToVar",
     "SeparateVirtualInterps",
-    "HonorHeaderOnlyRequests"</programlisting>
+    "HonorHeadRequests"</programlisting>
                                </listitem> 
                        
                        <listitem>
diff --git a/doc/xml/directives.xml b/doc/xml/directives.xml
index b0414c3..d95cb78 100644
--- a/doc/xml/directives.xml
+++ b/doc/xml/directives.xml
@@ -80,7 +80,7 @@
                                    <td>effective only when 
SeparateVirtualInterps is Off (default)</td></tr>
                                
<tr><td>ImportRivetNS</td><td></td><td></td><td>X</td><td>X</td><td>It can be 
set in a virtual host
                                configuration if SeparateVirtualInterps is On, 
otherwise this directive can be safely used at the global level only</td></tr>
-                               
<tr><td>HonorHeaderOnlyRequests</td><td></td><td></td><td>X</td><td>X</td><td></td></tr>
+                               
<tr><td>HonorHeadRequests</td><td></td><td></td><td>X</td><td>X</td><td></td></tr>
                                
<tr><td>MpmBridge</td><td></td><td></td><td>X</td><td></td><td>global 
only</td></tr>
                                
<tr><td>RequestHandler</td><td></td><td></td><td>X</td><td>X</td><td></td></tr>
                                
<tr><td>SeparateChannels</td><td></td><td></td><td>X</td><td></td><td>global 
only (DEPRECATED: will be
@@ -308,7 +308,7 @@
                        <varlistentry>
                <term>
                                        <cmdsynopsis>
-                                               <arg 
choice="plain">HonorHeaderOnlyRequests</arg>
+                                               <arg 
choice="plain">HonorHeadRequests</arg>
                                                <group choice="req">
                                                <arg>yes</arg>
                                                <arg>no</arg>
diff --git a/src/mod_rivet_ng/apache_config.c b/src/mod_rivet_ng/apache_config.c
index 226ab0f..e7bc550 100644
--- a/src/mod_rivet_ng/apache_config.c
+++ b/src/mod_rivet_ng/apache_config.c
@@ -227,7 +227,7 @@ Rivet_CopyConfig(rivet_server_conf *oldrsc, 
rivet_server_conf *newrsc)
     //newrsc->separate_virtual_interps = oldrsc->separate_virtual_interps;
     newrsc->export_rivet_ns = oldrsc->export_rivet_ns;
     newrsc->import_rivet_ns = oldrsc->import_rivet_ns;
-    newrsc->honor_header_only_reqs = oldrsc->honor_header_only_reqs;
+    newrsc->honor_head_requests = oldrsc->honor_head_requests;
     //newrsc->single_thread_exit = oldrsc->single_thread_exit;
     //newrsc->separate_channels = oldrsc->separate_channels;
     newrsc->server_name = oldrsc->server_name;
@@ -408,7 +408,7 @@ Rivet_MergeConfig(apr_pool_t *p, void *basev, void 
*overridesv)
     RIVET_CONF_SELECT(rsc,base,overrides,default_cache_size);
 
     //rsc->separate_virtual_interps = base->separate_virtual_interps;
-    rsc->honor_header_only_reqs = base->honor_header_only_reqs;
+    rsc->honor_head_requests = base->honor_head_requests;
     rsc->upload_files_to_var = base->upload_files_to_var;
     //rsc->single_thread_exit = base->single_thread_exit;
     //rsc->separate_channels = base->separate_channels;
@@ -468,7 +468,7 @@ Rivet_CreateConfig(apr_pool_t *p, server_rec *s )
     //rsc->separate_virtual_interps = RIVET_SEPARATE_VIRTUAL_INTERPS;
     rsc->export_rivet_ns            = RIVET_NAMESPACE_EXPORT;
     rsc->import_rivet_ns            = RIVET_NAMESPACE_IMPORT;
-    rsc->honor_header_only_reqs     = RIVET_HEAD_REQUESTS;
+    rsc->honor_head_requests     = RIVET_HEAD_REQUESTS;
     //rsc->single_thread_exit       = 0;
     //rsc->separate_channels        = RIVET_SEPARATE_CHANNELS;
     rsc->upload_dir                 = RIVET_UPLOAD_DIR;
@@ -645,8 +645,10 @@ Rivet_ServerConf(cmd_parms *cmd,void *dummy,const char 
*var,const char *val)
         Tcl_GetBoolean (NULL,val,&rsc->upload_files_to_var);
     } else if (STREQU (var,"SeparateVirtualInterps")) {
         Tcl_GetBoolean (NULL,val,&module_globals->separate_virtual_interps);
-    } else if (STREQU (var,"HonorHeaderOnlyRequests")) {
-        Tcl_GetBoolean (NULL,val,&rsc->honor_header_only_reqs);
+    } else if (STREQU (var,"HonorHeaderOnlyRequests")) { // DEPRECATED form 
for HonorHeadRequest
+        Tcl_GetBoolean (NULL,val,&rsc->honor_head_requests);
+    } else if (STREQU (var,"HonorHeadRequests")) {
+        Tcl_GetBoolean (NULL,val,&rsc->honor_head_requests);
     } else if (STREQU (var,"SingleThreadExit")) {
         Tcl_GetBoolean (NULL,val,&module_globals->single_thread_exit);
     } else if (STREQU (var,"SeparateChannels")) {
diff --git a/src/mod_rivet_ng/mod_rivet.h b/src/mod_rivet_ng/mod_rivet.h
index 20ae552..11f0e80 100644
--- a/src/mod_rivet_ng/mod_rivet.h
+++ b/src/mod_rivet_ng/mod_rivet.h
@@ -123,7 +123,7 @@ typedef struct _rivet_server_conf {
     int          default_cache_size;
     int          upload_max;
     int          upload_files_to_var;
-    int          honor_header_only_reqs;
+    int          honor_head_requests;
 
     int          export_rivet_ns;        /* export the ::rivet namespace 
commands        */
     int          import_rivet_ns;        /* import into the global namespace 
the
diff --git a/src/mod_rivet_ng/mod_rivet_generator.c 
b/src/mod_rivet_ng/mod_rivet_generator.c
index e153700..a93c88f 100644
--- a/src/mod_rivet_ng/mod_rivet_generator.c
+++ b/src/mod_rivet_ng/mod_rivet_generator.c
@@ -272,7 +272,7 @@ Rivet_SendContent(rivet_thread_private *private)
         goto sendcleanup;
     }
 
-    if (private->r->header_only && 
!private->running_conf->honor_header_only_reqs)
+    if (private->r->header_only && !private->running_conf->honor_head_requests)
     {
         TclWeb_SetHeaderType(DEFAULT_HEADER_TYPE, private->req);
         TclWeb_PrintHeaders(private->req);
diff --git a/src/mod_rivet_ng/rivetInspect.c b/src/mod_rivet_ng/rivetInspect.c
index ef7614f..148dee8 100644
--- a/src/mod_rivet_ng/rivetInspect.c
+++ b/src/mod_rivet_ng/rivetInspect.c
@@ -91,7 +91,7 @@ enum confIndices {
     upload_files_to_var,
     separate_virtual_interps,
     separate_channels,
-    honor_header_only_requests,
+    honor_head_requests,
     mpm_bridge,
     request_handler,
     export_rivet_ns,
@@ -157,7 +157,7 @@ Rivet_ReadConfParameter ( Tcl_Interp*        interp,
         case upload_files_to_var:       int_value = 
Tcl_NewIntObj(rsc->upload_files_to_var); break;
         case separate_virtual_interps:  int_value = 
Tcl_NewIntObj(module_globals->separate_virtual_interps); break;
         case separate_channels:         int_value = 
Tcl_NewIntObj(module_globals->separate_channels); break;
-        case honor_header_only_requests: int_value = 
Tcl_NewIntObj(rsc->honor_header_only_reqs); break;
+        case honor_head_requests:       int_value = 
Tcl_NewIntObj(rsc->honor_head_requests); break;
         case export_rivet_ns:           int_value = 
Tcl_NewIntObj(rsc->export_rivet_ns); break;
         case import_rivet_ns:           int_value = 
Tcl_NewIntObj(rsc->import_rivet_ns); break;
         default: return NULL;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tcl.apache.org
For additional commands, e-mail: commits-h...@tcl.apache.org

Reply via email to