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

Function compress_transform_add

plugins/compress/compress.cc:946–970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946static void
947compress_transform_add(TSHttpTxn txnp, HostConfiguration *hc, int compress_type, int algorithms)
948{
949 TSVConn connp;
950 Data *data;
951
952 TSHttpTxnUntransformedRespCache(txnp, 1);
953
954 if (!hc->cache()) {
955 debug("TransformedRespCache not enabled");
956 TSHttpTxnTransformedRespCache(txnp, 0);
957 } else {
958 debug("TransformedRespCache enabled");
959 TSHttpTxnUntransformedRespCache(txnp, 0);
960 TSHttpTxnTransformedRespCache(txnp, 1);
961 }
962
963 connp = TSTransformCreate(compress_transform, txnp);
964 data = data_alloc(compress_type, algorithms);
965 data->txn = txnp;
966 data->hc = hc;
967
968 TSContDataSet(connp, data);
969 TSHttpTxnHookAdd(txnp, TS_HTTP_RESPONSE_TRANSFORM_HOOK, connp);
970}
971
972static void
973handle_compression_and_vary(TSHttpTxn txnp, bool server, HostConfiguration *hc, int *compress_type, int *algorithms)

Callers 1

Calls 7

TSTransformCreateFunction · 0.85
data_allocFunction · 0.85
TSContDataSetFunction · 0.85
TSHttpTxnHookAddFunction · 0.85
cacheMethod · 0.45

Tested by

no test coverage detected