.\" Man page generated from reStructuredText. . .TH "TSHTTPTXNSERVERINTERCEPT" "3ts" "Mar 08, 2019" "7.1" "Apache Traffic Server" .SH NAME TSHttpTxnServerIntercept \- intercept origin server requests . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B void TSHttpTxnServerIntercept(TSCont\fI\ contp\fP, TSHttpTxn\fI\ txnp\fP) .UNINDENT .SH DESCRIPTION .sp \fI\%TSHttpTxnServerIntercept()\fP allows a plugin take over the servicing of the request as though it was the origin server. In the event a request needs to be made to the server for transaction \fItxnp\fP, \fIcontp\fP will be sent a \fBTS_EVENT_NET_ACCEPT\fP event. The \fIedata\fP passed with \fBTS_EVENT_NET_ACCEPT\fP is an \fBTSVConn\fP just as it would be for a normal accept. The plugin must act as if it is an HTTP server and read the HTTP request and body from the \fBTSVConn\fP and send an HTTP response header and body. .sp \fI\%TSHttpTxnServerIntercept()\fP must be not be called after the connection to the server has taken place. This means that the last hook that it can be called from is \fBTS_HTTP_READ_CACHE_HDR_HOOK\fP\&. If a connection to the server is not necessary, the continuation \fIcontp\fP will be sent a \fBTS_EVENT_NET_ACCEPT_FAILED\fP event when the transaction completes. .sp The response from the plugin is cached subject to standard and configured HTTP caching rules. Should the plugin wish the response not be cached, the plugin must use appropriate HTTP response headers to prevent caching. The primary purpose of \fI\%TSHttpTxnServerIntercept()\fP is allow plugins to provide gateways to other protocols or to allow to plugin to its own transport for the next hop to the server. \fI\%TSHttpTxnServerIntercept()\fP overrides parent cache configuration. .sp \fI\%TSHttpTxnServerIntercept()\fP must only be called once per transaction. The continuation \fIcontp\fP must have been created with a valid \fBTSMutex\fP\&. .SH SEE ALSO .sp \fBTSAPI(3ts)\fP .SH COPYRIGHT 2019, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .