From 490966f1e1800b911d0ce667144f95c0e8a71062 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Fri, 20 Apr 2012 14:51:06 +0530 Subject: [PATCH 3/3] bug 452 - enable http extra callbacks for configs other than the default configs --- src/app-layer-htp.c | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 298c662..a9742cf 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2388,15 +2388,20 @@ void RegisterHTPParsers(void) void AppLayerHtpRegisterExtraCallbacks(void) { SCEnter(); SCLogDebug("Registering extra htp callbacks"); - if (need_htp_request_body == 1) { - SCLogDebug("Registering callback htp_config_register_request_body_data on htp"); - htp_config_register_request_body_data(cfglist.cfg, - HTPCallbackRequestBodyData); - } - if (need_htp_response_body == 1) { - SCLogDebug("Registering callback htp_config_register_response_body_data on htp"); - htp_config_register_response_body_data(cfglist.cfg, - HTPCallbackResponseBodyData); + + HTPCfgRec *p_cfglist = &cfglist; + while (p_cfglist != NULL) { + if (need_htp_request_body == 1) { + SCLogDebug("Registering callback htp_config_register_request_body_data on htp"); + htp_config_register_request_body_data(p_cfglist->cfg, + HTPCallbackRequestBodyData); + } + if (need_htp_response_body == 1) { + SCLogDebug("Registering callback htp_config_register_response_body_data on htp"); + htp_config_register_response_body_data(p_cfglist->cfg, + HTPCallbackResponseBodyData); + } + p_cfglist = p_cfglist->next; } SCReturn; } -- 1.7.1