Home
last modified time | relevance | path

Searched refs:txn (Results 1 – 25 of 59) sorted by relevance

123

/trafficserver/tests/tools/plugins/
H A Dtest_hooks.cc62 auto txn = static_cast<TSHttpTxn>(eventData); in transactionContFunc() local
67 ALWAYS_ASSERT((txn == activeTxn) or !activeTxn) in transactionContFunc()
75 auto txn = static_cast<TSHttpTxn>(eventData); in transactionContFunc() local
79 ALWAYS_ASSERT(txn == activeTxn) in transactionContFunc()
114 auto txn = static_cast<TSHttpTxn>(eventData); in sessionContFunc() local
130 auto txn = static_cast<TSHttpTxn>(eventData); in sessionContFunc() local
143 auto txn = static_cast<TSHttpTxn>(eventData); in sessionContFunc() local
147 ALWAYS_ASSERT(txn == activeTxn) in sessionContFunc()
238 activeTxn = txn; in globalContFunc()
250 ALWAYS_ASSERT(txn == activeTxn) in globalContFunc()
[all …]
H A Dtest_tsapi.cc52 testsForReadReqHdrHook(TSHttpTxn txn) in testsForReadReqHdrHook() argument
56 char *urlStr = TSHttpTxnEffectiveUrlStringGet(txn, &urlLength); in testsForReadReqHdrHook()
74 if (TSHttpTxnClientReqGet(txn, &hbuf, &hloc) != TS_SUCCESS) { in testsForReadReqHdrHook()
121 auto txn = static_cast<TSHttpTxn>(eventData); in transactionContFunc() local
123 testsForReadReqHdrHook(txn); in transactionContFunc()
125 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in transactionContFunc()
146 auto txn = static_cast<TSHttpTxn>(eventData); in globalContFunc() local
150 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in globalContFunc()
154 auto txn = static_cast<TSHttpTxn>(eventData); in globalContFunc() local
156 testsForReadReqHdrHook(txn); in globalContFunc()
[all …]
H A Dssl_hook_test.cc300 if (txn) { in setup_callbacks()
309 if (txn) { in setup_callbacks()
318 if (txn) { in setup_callbacks()
327 if (txn) { in setup_callbacks()
336 if (txn) { in setup_callbacks()
345 if (txn) { in setup_callbacks()
354 if (txn) { in setup_callbacks()
364 if (txn) { in setup_callbacks()
373 if (txn) { in setup_callbacks()
382 if (txn) { in setup_callbacks()
[all …]
/trafficserver/plugins/experimental/hook-trace/
H A Dhook-trace.cc39 TSHttpTxn txn; in HttpHookTracer() member
64 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
69 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
74 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
79 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
84 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
89 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
94 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
99 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
104 TSHttpTxnReenable(ev.txn, TS_EVENT_HTTP_CONTINUE); in HttpHookTracer()
[all …]
/trafficserver/plugins/xdebug/
H A Dxdebug.cc423 InjectCacheKeyHeader(txn, buffer, hdr); in XInjectResponseHeaders()
427 InjectCacheHeader(txn, buffer, hdr); in XInjectResponseHeaders()
431 InjectMilestonesHeader(txn, buffer, hdr); in XInjectResponseHeaders()
435 InjectGenerationHeader(txn, buffer, hdr); in XInjectResponseHeaders()
439 InjectTxnUuidHeader(txn, buffer, hdr); in XInjectResponseHeaders()
443 InjectRemapHeader(txn, buffer, hdr); in XInjectResponseHeaders()
460 writePostBody(txn, data); in XInjectResponseHeaders()
576 TSHttpTxnDebugSet(txn, 1); in XScanRequestHeaders()
589 TSContDataSet(connp, txn); in XScanRequestHeaders()
593 TSHttpTxnReqCacheableSet(txn, 0); in XScanRequestHeaders()
[all …]
H A Dxdebug_headers.cc158 print_headers(txn, bufp, hdr_loc, output); in log_headers()
164 print_request_headers(TSHttpTxn txn, std::stringstream &output) in print_request_headers() argument
168 if (TSHttpTxnClientReqGet(txn, &buf_c, &hdr_loc) == TS_SUCCESS) { in print_request_headers()
170 print_headers(txn, buf_c, hdr_loc, output); in print_request_headers()
174 if (TSHttpTxnServerReqGet(txn, &buf_s, &hdr_loc) == TS_SUCCESS) { in print_request_headers()
176 print_headers(txn, buf_s, hdr_loc, output); in print_request_headers()
183 print_response_headers(TSHttpTxn txn, std::stringstream &output) in print_response_headers() argument
187 if (TSHttpTxnServerRespGet(txn, &buf_s, &hdr_loc) == TS_SUCCESS) { in print_response_headers()
189 print_headers(txn, buf_s, hdr_loc, output); in print_response_headers()
193 if (TSHttpTxnClientRespGet(txn, &buf_c, &hdr_loc) == TS_SUCCESS) { in print_response_headers()
[all …]
H A Dxdebug_transforms.cc32 getPreBody(TSHttpTxn txn) in getPreBody() argument
36 print_request_headers(txn, output); in getPreBody()
43 getPostBody(TSHttpTxn txn) in getPostBody() argument
48 print_response_headers(txn, output); in getPostBody()
54 writePostBody(TSHttpTxn txn, BodyBuilder *data) in writePostBody() argument
58 std::string postbody = getPostBody(txn); in writePostBody()
69 TSHttpTxn txn = static_cast<TSHttpTxn>(TSContDataGet(contp)); in body_transform() local
70 BodyBuilder *data = AuxDataMgr::data(txn).body_builder.get(); in body_transform()
103 std::string prebody = getPreBody(txn); in body_transform()
114 writePostBody(txn, data); in body_transform()
[all …]
H A DCleanup.h155 data(TSHttpTxn txn) in data() argument
161 auto d = static_cast<TxnAuxData *>(TSUserArgGet(txn, md.txnArgIndex)); in data()
165 TSUserArgSet(txn, md.txnArgIndex, d); in data()
167 TSHttpTxnHookAdd(txn, TS_HTTP_TXN_CLOSE_HOOK, md.txnCloseContp); in data()
178 auto txn = static_cast<TSHttpTxn>(edata); in _deleteAuxData() local
179 auto data = static_cast<TxnAuxData *>(TSUserArgGet(txn, md.txnArgIndex)); in _deleteAuxData()
181 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in _deleteAuxData()
/trafficserver/proxy/http3/
H A DHttp09App.cc70 …Http09Transaction *txn = static_cast<Http09Transaction *>(this->_ssn->get_transaction(stream_id)); in main_event_handler() local
81 if (txn == nullptr) { in main_event_handler()
82 txn = new Http09Transaction(this->_ssn, stream_io); in main_event_handler()
83 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in main_event_handler()
85 txn->new_transaction(); in main_event_handler()
87 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in main_event_handler()
88 txn->handleEvent(event); in main_event_handler()
94 if (txn != nullptr) { in main_event_handler()
95 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in main_event_handler()
96 txn->handleEvent(event); in main_event_handler()
H A DHttp3App.cc210 … Http3Transaction *txn = static_cast<Http3Transaction *>(this->_ssn->get_transaction(stream_id)); in _handle_bidi_stream_on_read_ready() local
212 if (txn == nullptr) { in _handle_bidi_stream_on_read_ready()
213 txn = new Http3Transaction(this->_ssn, stream_io); in _handle_bidi_stream_on_read_ready()
214 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in _handle_bidi_stream_on_read_ready()
216 txn->new_transaction(); in _handle_bidi_stream_on_read_ready()
218 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in _handle_bidi_stream_on_read_ready()
219 txn->handleEvent(event); in _handle_bidi_stream_on_read_ready()
287 Http3Transaction *txn = static_cast<Http3Transaction *>(this->_ssn->get_transaction(stream_id)); in _handle_bidi_stream_on_write_ready() local
288 if (txn != nullptr) { in _handle_bidi_stream_on_write_ready()
289 SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread()); in _handle_bidi_stream_on_write_ready()
[all …]
/trafficserver/plugins/experimental/remap_stats/
H A Dremap_stats.cc86 get_effective_host(TSHttpTxn txn) in get_effective_host() argument
113 TSHttpTxn txn = (TSHttpTxn)edata; in handle_read_req_hdr() local
119 TSUserArgSet(txn, config->txn_slot, txnd); in handle_read_req_hdr()
121 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in handle_read_req_hdr()
129 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in handle_post_remap() local
136 TSUserArgSet(txn, config->txn_slot, txnd); in handle_post_remap()
139 TSUserArgSet(txn, config->txn_slot, txnd); in handle_post_remap()
142 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in handle_post_remap()
176 effective_hostname = get_effective_host(txn); in handle_txn_close()
185 in_bytes += TSHttpTxnClientReqBodyBytesGet(txn); in handle_txn_close()
[all …]
/trafficserver/plugins/authproxy/
H A Dauthproxy.cc242 AuthRequestGetMethod(TSHttpTxn txn) in AuthRequestGetMethod() argument
267 TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_ERROR); in AuthChainAuthorizationResponse()
397 auth->method = AuthRequestGetMethod(auth->txn); in StateAuthProxyConnect()
483 TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_CONTINUE); in StateAuthProxySendResponse()
597 TSHttpTxnReenable(auth->txn, TS_EVENT_HTTP_ERROR); in StateUnauthorized()
622 AuthRequestIsTagged(TSHttpTxn txn) in AuthRequestIsTagged() argument
630 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in AuthProxyGlobalHook() local
637 if (TSHttpTxnIsInternal(txn)) { in AuthProxyGlobalHook()
648 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in AuthProxyGlobalHook()
656 auth->txn = txn; in AuthProxyGlobalHook()
[all …]
/trafficserver/src/tscpp/api/
H A DGlobalPlugin.cc59 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in handleGlobalPluginEvents() local
60 if (state->ignore_internal_transactions_ && TSHttpTxnIsInternal(txn)) { in handleGlobalPluginEvents()
61 …LOG_DEBUG("Ignoring event %d on internal transaction %p for global plugin %p", event, txn, state->… in handleGlobalPluginEvents()
62 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in handleGlobalPluginEvents()
64 …l plugin %p for event %d on transaction %p", state->global_plugin_, event, txn); in handleGlobalPluginEvents()
65 utils::internal::invokePluginForEvent(state->global_plugin_, txn, event); in handleGlobalPluginEvents()
H A DTransaction.cc67 TransactionState(TSHttpTxn txn, TSMBuffer client_request_hdr_buf, TSMLoc client_request_hdr_loc) in TransactionState()
68 : txn_(txn), in TransactionState()
72 client_request_(txn, client_request_hdr_buf, client_request_hdr_loc), in TransactionState()
87 TSHttpTxn txn = static_cast<TSHttpTxn>(raw_txn); in Transaction() local
90 (void)TSHttpTxnClientReqGet(txn, &hdr_buf, &hdr_loc); in Transaction()
92 …LOG_ERROR("TSHttpTxnClientReqGet tshttptxn=%p returned a null hdr_buf=%p or hdr_loc=%p.", txn, hdr… in Transaction()
95 state_ = new TransactionState(txn, hdr_buf, hdr_loc); in Transaction()
96 …ting Transaction object %p, client req hdr_buf=%p, client req hdr_loc=%p", txn, this, in Transaction()
425 operator()(TSHttpTxn txn, TSMBuffer &hdr_buf, TSMLoc &hdr_loc, const char *handles_name) in operator ()() argument
429 if (getter_(txn, &hdr_buf, &hdr_loc) == TS_SUCCESS) { in operator ()()
H A DClientRequest.cc39 …ClientRequestState(TSHttpTxn txn) : txn_(txn), pristine_hdr_buf_(nullptr), pristine_url_loc_(nullp… in ClientRequestState()
H A DTransactionPlugin.cc50 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in handleTransactionPluginEvents() local
53 atscppapi::utils::internal::invokePluginForEvent(plugin, txn, event); in handleTransactionPluginEvents()
/trafficserver/plugins/cachekey/
H A Dplugin.cc39 setCacheKey(TSHttpTxn txn, Configs *config, TSRemapRequestInfo *rri = nullptr) in setCacheKey() argument
45 CacheKey cachekey(txn, config->getSeparator(), config->getUriType(), type, rri); in setCacheKey()
78 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in contSetCachekey() local
80 setCacheKey(txn, globalConfig); in contSetCachekey()
82 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in contSetCachekey()
182 TSRemapDoRemap(void *instance, TSHttpTxn txn, TSRemapRequestInfo *rri) in TSRemapDoRemap() argument
187 setCacheKey(txn, config, rri); in TSRemapDoRemap()
/trafficserver/plugins/escalate/
H A Descalate.cc87 TSHttpTxn txn = static_cast<TSHttpTxn>(edata); in EscalateResponse() local
99 if (TS_SUCCESS != TSHttpTxnServerRespGet(txn, &mbuf, &hdrp)) { in EscalateResponse()
103 tries = TSHttpTxnRedirectRetries(txn); in EscalateResponse()
126 if (TS_SUCCESS == TSHttpTxnPristineUrlGet(txn, &mbuf, &url)) { in EscalateResponse()
131 if (TS_SUCCESS == TSHttpTxnClientReqGet(txn, &mbuf, &hdrp)) { in EscalateResponse()
143 TSHttpTxnRedirectUrlSet(txn, url_str, url_len); // Transfers ownership in EscalateResponse()
148 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in EscalateResponse()
223 TSRemapDoRemap(void *instance, TSHttpTxn txn, TSRemapRequestInfo * /* rri */) in TSRemapDoRemap() argument
227 TSHttpTxnHookAdd(txn, TS_HTTP_READ_RESPONSE_HDR_HOOK, es->cont); in TSRemapDoRemap()
/trafficserver/plugins/experimental/sslheaders/
H A Dsslheaders.cc32 TSHttpTxn txn; in SslHdrExpandRequestHook() local
36 txn = static_cast<TSHttpTxn>(edata); in SslHdrExpandRequestHook()
38 TSVConn vconn = TSHttpSsnClientVConnGet(TSHttpTxnSsnGet(txn)); in SslHdrExpandRequestHook()
43 if (TSHttpTxnClientReqGet(txn, &mbuf, &mhdr) != TS_SUCCESS) { in SslHdrExpandRequestHook()
49 if (TSHttpTxnServerReqGet(txn, &mbuf, &mhdr) != TS_SUCCESS) { in SslHdrExpandRequestHook()
68 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in SslHdrExpandRequestHook()
314 TSRemapDoRemap(void *instance, TSHttpTxn txn, TSRemapRequestInfo * /* rri */) in TSRemapDoRemap() argument
320 TSHttpTxnHookAdd(txn, TS_HTTP_SEND_REQUEST_HDR_HOOK, hdr->cont); in TSRemapDoRemap()
324 TSHttpTxnHookAdd(txn, TS_HTTP_READ_REQUEST_HDR_HOOK, hdr->cont); in TSRemapDoRemap()
325 TSHttpTxnHookAdd(txn, TS_HTTP_SEND_REQUEST_HDR_HOOK, hdr->cont); in TSRemapDoRemap()
/trafficserver/example/plugins/c-api/intercept/
H A Dintercept.cc132 TSHttpTxn txn = nullptr; // The transaction on whose behalf we are intercepting. member
196 TSHttpTxn txn; member
213 InterceptShouldInterceptRequest(TSHttpTxn txn) in InterceptShouldInterceptRequest() argument
221 TSReleaseAssert(TSHttpTxnCacheLookupStatusGet(txn, &status) == TS_SUCCESS); in InterceptShouldInterceptRequest()
289 VDEBUG("allocated server intercept state istate=%p for txn=%p", istate, cdata.txn); in InterceptInterceptHook()
331 istate->txn = cdata.txn; in InterceptInterceptHook()
373 VDEBUG("cancelling server intercept request for txn=%p", cdata.txn); in InterceptInterceptHook()
516 if (InterceptShouldInterceptRequest(arg.txn)) { in InterceptTxnHook()
519 VDEBUG("intercepting origin server request for txn=%p, cont=%p", arg.txn, c); in InterceptTxnHook()
520 TSHttpTxnServerIntercept(c, arg.txn); in InterceptTxnHook()
[all …]
/trafficserver/src/traffic_server/
H A DInkAPITest.cc526 return txn; in synclient_txn_create()
540 TSfree(txn); in synclient_txn_delete()
547 if (txn) { in synclient_txn_close()
622 txn->response[txn->response_len] = '\0'; in synclient_txn_read_response()
704 txn->write_vio = TSVConnWrite(txn->vconn, contp, txn->req_reader, len); in synclient_txn_write_request()
728 txn->read_vio = TSVConnRead(txn->vconn, contp, txn->resp_buffer, INT64_MAX); in synclient_txn_write_request_handler()
927 txn->req_reader = TSIOBufferReaderAlloc(txn->req_buffer); in synserver_vc_accept()
940 txn->read_vio = TSVConnRead(txn->vconn, txn_cont, txn->req_buffer, INT64_MAX); in synserver_vc_accept()
962 TSfree(txn); in synserver_txn_close()
999 txn->write_vio = TSVConnWrite(txn->vconn, contp, txn->resp_reader, len); in synserver_txn_write_response()
[all …]
/trafficserver/plugins/experimental/tls_bridge/
H A Dtls_bridge.cc266 Bridge(TSCont cont, TSHttpTxn txn, TextView peer);
296 Bridge::Bridge(TSCont cont, TSHttpTxn txn, TextView peer) : _self_cont(cont), _ua_txn(txn), _peer(p… in Bridge() argument
649 auto txn = static_cast<TSHttpTxn>(data); in CB_Read_Request_Hdr() local
653 if (!TSHttpTxnIsInternal(txn)) { in CB_Read_Request_Hdr()
654 if (TS_SUCCESS == TSHttpTxnClientReqGet(txn, &mbuf, &hdr_loc)) { in CB_Read_Request_Hdr()
664 auto ctx = new Bridge(actor, txn, peer); in CB_Read_Request_Hdr()
672 TSHttpTxnHookAdd(txn, TS_HTTP_SEND_RESPONSE_HDR_HOOK, actor); in CB_Read_Request_Hdr()
674 TSHttpTxnHookAdd(txn, TS_HTTP_TXN_CLOSE_HOOK, actor); in CB_Read_Request_Hdr()
676 TSSkipRemappingSet(txn, 1); in CB_Read_Request_Hdr()
678 TSHttpTxnIntercept(actor, txn); in CB_Read_Request_Hdr()
[all …]
/trafficserver/doc/developer-guide/plugins/hooks-and-transactions/
H A Dhttp-transactions.en.rst51 #define DBG_TAG "txn"
88 /* Modify values of txn data */
95 /* Print txn data values */
98 /* Then destroy the txn cont and its data */
122 /* Create a new continuation for this txn and associate data to it */
147 /* Note that we do not need a mutex for this txn since it registers globally
157 also the :ref:`HTTP Transaction State Diagram <http-txn-state-diagram>` for an
/trafficserver/plugins/generator/
H A Dgenerator.cc93 TSHttpTxn txn; member
446 VDEBUG("cancelling server intercept request for txn=%p", cdata.txn); in GeneratorInterceptHook()
626 TSReleaseAssert(TSHttpTxnClientReqGet(arg.txn, &recp, &hdr_loc) == TS_SUCCESS); in GeneratorTxnHook()
628 CheckCacheable(arg.txn, url_loc, recp); in GeneratorTxnHook()
637 TSReleaseAssert(TSHttpTxnCacheLookupStatusGet(arg.txn, &status) == TS_SUCCESS); in GeneratorTxnHook()
640 VDEBUG("intercepting origin server request for txn=%p", arg.txn); in GeneratorTxnHook()
641 TSHttpTxnServerIntercept(TSContCreate(GeneratorInterceptHook, TSMutexCreate()), arg.txn); in GeneratorTxnHook()
651 TSHttpTxnReenable(arg.txn, TS_EVENT_HTTP_CONTINUE); in GeneratorTxnHook()
703 TSRemapDoRemap(void * /* ih */, TSHttpTxn txn, TSRemapRequestInfo *rri) in TSRemapDoRemap() argument
706 CheckCacheable(txn, rri->requestUrl, rri->requestBufp); in TSRemapDoRemap()
[all …]
/trafficserver/plugins/regex_revalidate/
H A Dregex_revalidate.c388 get_date_from_cached_hdr(TSHttpTxn txn) in get_date_from_cached_hdr() argument
394 if (TSHttpTxnCachedRespGet(txn, &buf, &hdr_loc) == TS_SUCCESS) { in get_date_from_cached_hdr()
409 TSHttpTxn txn = (TSHttpTxn)edata; in main_handler() local
420 if (TSHttpTxnCacheLookupStatusGet(txn, &status) == TS_SUCCESS) { in main_handler()
426 date = get_date_from_cached_hdr(txn); in main_handler()
431 url = TSHttpTxnEffectiveUrlStringGet(txn, &url_len); in main_handler()
434 TSHttpTxnCacheLookupStatusSet(txn, TS_CACHE_LOOKUP_HIT_STALE); in main_handler()
453 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); in main_handler()

Completed in 644 milliseconds

123