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

Function observe

tests/gold_tests/headers/via-observer.py:26–36  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

24
25
26def observe(headers):
27 if 'via' in headers:
28 via = headers['via']
29 if via:
30 via = rxp.sub(r'\1 = \5', via)
31 else:
32 via = '---empty---'
33 else:
34 via = '---missing---'
35 log.write("Via: {}\n".format(via))
36 log.flush()
37
38
39Hooks.register(Hooks.ReadRequestHook, observe)

Callers

nothing calls this directly

Calls 3

writeMethod · 0.45
formatMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected