You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Scott Beardsley <sb...@yahoo-inc.com> on 2014/05/06 17:18:33 UTC

Escalate and

Hey all, we are trying patch escalate[1][2] to intercept a response based on some criteria (like configuration and response status) and modify the contents of the response body without dropping the connection to the origin. So far TSHttpTxnErrorBodySet() looks good but since it appears to require the TS_EVENT_HTTP_ERROR state it won't work. According to the following comments, and our real-world observations, it drops the transaction (and the connection to the origin):

Comments from ts.h:

        - TS_EVENT_HTTP_ERROR which terminates the transaction

          and sends an error to the client if no response has already
          been sent.

Any guidance on what API to use which will allow modifying the response body without terminating the connection to the origin? Can we only do this with a transform plugin? TSHttpTxnErrorBodySet appears to do exactly what we want but it drops the connection to the origin. Maybe there is room for a similar api call to do the same but keep the connection to the origin live? Or maybe a new "soft-fail" state for errors which are not catastrophic and do not require a new connection be established?

We tried using TS_EVENT_HTTP_CONTINUE but then the call to TSHttpTxnErrorBodySet produces an INKAPI error.

Thanks,
Scott
--
[1] https://cwiki.apache.org/confluence/display/TS/EscalationPlugin
[2] https://github.com/apache/trafficserver/blob/master/plugins/experimental/escalate/escalate.cc