@@ -145,6 +145,51 @@ Transaction::Transaction(ModSecurity *ms, Rules *rules, void *logCbData)
145
145
intervention::clean (&m_it);
146
146
}
147
147
148
+ Transaction::Transaction (ModSecurity *ms, Rules *rules, char *id, void *logCbData)
149
+ : m_clientPort(0 ),
150
+ m_serverPort(0 ),
151
+ m_uri_no_query_string_decoded(" " ),
152
+ m_rules(rules),
153
+ m_timeStamp(std::time(NULL )),
154
+ m_httpCodeReturned(200 ),
155
+ m_highestSeverityAction(255 ),
156
+ m_ARGScombinedSizeDouble(0 ),
157
+ m_requestBodyType(UnknownFormat),
158
+ m_requestBodyProcessor(UnknownFormat),
159
+ m_requestBodyAccess(Rules::PropertyNotSetConfigBoolean),
160
+ m_marker(" " ),
161
+ m_allowType(modsecurity::actions::disruptive::NoneAllowType),
162
+ m_skip_next(0 ),
163
+ m_creationTimeStamp(utils::cpu_seconds()),
164
+ m_logCbData(logCbData),
165
+ m_ms(ms),
166
+ m_secRuleEngine(RulesProperties::PropertyNotSetRuleEngine),
167
+ m_collections(ms->m_global_collection, ms->m_ip_collection,
168
+ ms->m_session_collection, ms->m_user_collection,
169
+ ms->m_resource_collection),
170
+ #ifdef WITH_YAJL
171
+ m_json (new RequestBodyProcessor::JSON(this )),
172
+ #else
173
+ m_json (NULL ),
174
+ #endif
175
+ #ifdef WITH_LIBXML2
176
+ m_xml (new RequestBodyProcessor::XML(this )),
177
+ #else
178
+ m_xml (NULL ),
179
+ #endif
180
+ TransactionAnchoredVariables (this ) {
181
+ m_id = std::string (id);
182
+ m_rules->incrementReferenceCount ();
183
+
184
+ m_variableUrlEncodedError.set (" 0" , 0 );
185
+
186
+ #ifndef NO_LOGS
187
+ this ->debug (4 , " Initializing transaction" );
188
+ #endif
189
+
190
+ intervention::clean (&m_it);
191
+ }
192
+
148
193
149
194
Transaction::~Transaction () {
150
195
m_responseBody.str (std::string ());
@@ -1795,7 +1840,10 @@ extern "C" Transaction *msc_new_transaction(ModSecurity *ms,
1795
1840
Rules *rules, void *logCbData) {
1796
1841
return new Transaction (ms, rules, logCbData);
1797
1842
}
1798
-
1843
+ extern " C" Transaction *msc_new_transaction_with_id (ModSecurity *ms,
1844
+ Rules *rules, char *id, void *logCbData) {
1845
+ return new Transaction (ms, rules, id, logCbData);
1846
+ }
1799
1847
1800
1848
/* *
1801
1849
* @name msc_process_connection
0 commit comments