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

Function get_request_id

src/api/InkAPITest.cc:478–492  ·  view source on GitHub ↗

This routine can be called by tests, from the READ_REQUEST_HDR_HOOK to figure out the id of a test message Returns id/-1 in case of error

Source from the content-addressed store, hash-verified

476// to figure out the id of a test message
477// Returns id/-1 in case of error
478static int
479get_request_id(TSHttpTxn txnp)
480{
481 TSMBuffer bufp;
482 TSMLoc hdr_loc;
483 int id = -1;
484
485 if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
486 return -1;
487 }
488
489 id = get_request_id_value(X_REQUEST_ID, bufp, hdr_loc);
490 TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
491 return id;
492}
493
494// This routine can be called by tests, from the READ_RESPONSE_HDR_HOOK
495// to figure out the id of a test message

Callers 2

parent_proxy_successFunction · 0.85
cont_test_handlerFunction · 0.85

Calls 3

TSHttpTxnClientReqGetFunction · 0.85
get_request_id_valueFunction · 0.85
TSHandleMLocReleaseFunction · 0.85

Tested by

no test coverage detected