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

Function global_handler

tests/tools/plugins/test_log_interface.cc:51–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51int
52global_handler(TSCont /* continuation ATS_UNUSED */, TSEvent event, void *data)
53{
54 TSHttpSsn session = static_cast<TSHttpSsn>(data);
55 TSHttpTxn transaction = static_cast<TSHttpTxn>(data);
56
57 switch (event) {
58 case TS_EVENT_HTTP_READ_REQUEST_HDR:
59 if (is_get_request(transaction)) {
60 const std::string long_line(5000, 's');
61 TSTextLogObjectWrite(pluginlog, "Got a GET request. Writing a long line: %s", long_line.c_str());
62 }
63 TSHttpTxnReenable(transaction, TS_EVENT_HTTP_CONTINUE);
64 return 0;
65
66 default:
67 TSError("[%s] global_handler: unexpected event: %d\n", plugin_name, event);
68 break;
69 }
70
71 TSHttpSsnReenable(session, TS_EVENT_HTTP_CONTINUE);
72 return 0;
73}
74
75void
76TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)

Callers

nothing calls this directly

Calls 6

is_get_requestFunction · 0.85
TSTextLogObjectWriteFunction · 0.85
TSHttpTxnReenableFunction · 0.85
TSHttpSsnReenableFunction · 0.85
TSErrorFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected