1
- // Copyright (C) 2017-2022 Internet Systems Consortium, Inc. ("ISC")
1
+ // Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
2
2
//
3
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -28,13 +28,13 @@ namespace {
28
28
29
29
// / Structure that holds registered hook indexes.
30
30
struct CtrlAgentHooks {
31
- int hook_index_auth_ ; // /< index of "auth " hook point.
32
- int hook_index_response_ ; // /< index of "response " hook point.
31
+ int hook_index_http_auth_ ; // /< index of "http_auth " hook point.
32
+ int hook_index_http_response_ ; // /< index of "http_response " hook point.
33
33
34
34
// / Constructor that registers hook points.
35
35
CtrlAgentHooks () {
36
- hook_index_auth_ = HooksManager::registerHook (" auth " );
37
- hook_index_response_ = HooksManager::registerHook (" response " );
36
+ hook_index_http_auth_ = HooksManager::registerHook (" http_auth " );
37
+ hook_index_http_response_ = HooksManager::registerHook (" http_response " );
38
38
}
39
39
};
40
40
@@ -116,9 +116,9 @@ createDynamicHttpResponse(HttpRequestPtr request) {
116
116
}
117
117
}
118
118
119
- // Callout point for "auth ".
119
+ // Callout point for "http_auth ".
120
120
bool reset_handle = false ;
121
- if (HooksManager::calloutsPresent (Hooks.hook_index_auth_ )) {
121
+ if (HooksManager::calloutsPresent (Hooks.hook_index_http_auth_ )) {
122
122
// Get callout handle.
123
123
CalloutHandlePtr callout_handle = request->getCalloutHandle ();
124
124
ScopedCalloutHandleState callout_handle_state (callout_handle);
@@ -128,7 +128,8 @@ createDynamicHttpResponse(HttpRequestPtr request) {
128
128
callout_handle->setArgument (" response" , http_response);
129
129
130
130
// Call callouts.
131
- HooksManager::callCallouts (Hooks.hook_index_auth_ , *callout_handle);
131
+ HooksManager::callCallouts (Hooks.hook_index_http_auth_ ,
132
+ *callout_handle);
132
133
callout_handle->getArgument (" request" , request);
133
134
callout_handle->getArgument (" response" , http_response);
134
135
@@ -180,8 +181,8 @@ createDynamicHttpResponse(HttpRequestPtr request) {
180
181
http_response->setBodyAsJson (response);
181
182
http_response->finalize ();
182
183
183
- // Callout point for "response ".
184
- if (HooksManager::calloutsPresent (Hooks.hook_index_response_ )) {
184
+ // Callout point for "http_response ".
185
+ if (HooksManager::calloutsPresent (Hooks.hook_index_http_response_ )) {
185
186
// Get callout handle.
186
187
CalloutHandlePtr callout_handle = request->getCalloutHandle ();
187
188
ScopedCalloutHandleState callout_handle_state (callout_handle);
@@ -191,7 +192,7 @@ createDynamicHttpResponse(HttpRequestPtr request) {
191
192
callout_handle->setArgument (" response" , http_response);
192
193
193
194
// Call callouts.
194
- HooksManager::callCallouts (Hooks.hook_index_response_ ,
195
+ HooksManager::callCallouts (Hooks.hook_index_http_response_ ,
195
196
*callout_handle);
196
197
callout_handle->getArgument (" response" , http_response);
197
198
0 commit comments