MCPcopy Create free account
hub / github.com/apache/trafficserver / transformable

Function transformable

src/api/InkAPITest.cc:7875–7897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7873}
7874
7875static int
7876transformable(TSHttpTxn txnp, TransformTestData *data)
7877{
7878 TSMBuffer bufp;
7879 TSMLoc hdr_loc;
7880 int ret = 0;
7881
7882 if (TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
7883 SDK_RPRINT(data->test, "TSHttpTxnTransform", "", TC_FAIL, "[transformable]: TSHttpTxnServerRespGet return 0");
7884 return ret;
7885 }
7886
7887 /*
7888 * We are only interested in "200 OK" responses.
7889 */
7890
7891 if (TS_HTTP_STATUS_OK == TSHttpHdrStatusGet(bufp, hdr_loc)) {
7892 ret = 1;
7893 }
7894
7895 TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
7896 return ret; /* not a 200 */
7897}
7898
7899static void
7900transform_add(TSHttpTxn txnp, TransformTestData *test_data)

Callers 1

transform_hook_handlerFunction · 0.70

Calls 4

TSHttpTxnServerRespGetFunction · 0.85
SDK_RPRINTFunction · 0.85
TSHttpHdrStatusGetFunction · 0.85
TSHandleMLocReleaseFunction · 0.85

Tested by

no test coverage detected