logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TSHttpTxnIntercept - allows a plugin take over the servicing of the request as though it was the origin

Description

contp will be sent TS_EVENT_NET_ACCEPT. The edata passed with TS_EVENT_NET_ACCEPT is an TSVConn  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 off the TSVConn and send an HTTP response header and body.

       TSHttpTxnIntercept()   must   be   called  be  called  from  only  TS_HTTP_READ_REQUEST_HDR_HOOK.   Using
       TSHttpTxnIntercept will bypass the Traffic Server cache.  If  response  sent  by  the  plugin  should  be
       cached,  use  TSHttpTxnServerIntercept()  instead.   TSHttpTxnIntercept() primary use is allow plugins to
       serve data about their functioning directly.

       TSHttpTxnIntercept() must only be called once per transaction.

Name

       TSHttpTxnIntercept  -  allows a plugin take over the servicing of the request as though it was the origin
       server

Synopsis

          #include <ts/ts.h>

       voidTSHttpTxnIntercept(TSContcontp,TSHttpTxntxnp)

See Also