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

Function checkHttpTxnServerRespGet

src/api/InkAPITest.cc:3415–3438  ·  view source on GitHub ↗

This func is called by us from mytest_handler to test TSHttpTxnServerRespGet

Source from the content-addressed store, hash-verified

3413
3414// This func is called by us from mytest_handler to test TSHttpTxnServerRespGet
3415static int
3416checkHttpTxnServerRespGet(SocketTest *test, void *data)
3417{
3418 TSMBuffer bufp;
3419 TSMLoc mloc;
3420 TSHttpTxn txnp = static_cast<TSHttpTxn>(data);
3421
3422 if (TSHttpTxnServerRespGet(txnp, &bufp, &mloc) != TS_SUCCESS) {
3423 test->test_server_resp_get = false;
3424 SDK_RPRINT(test->regtest, "TSHttpTxnServerRespGet", "TestCase1", TC_FAIL, "Unable to get handle to server response");
3425 return TS_EVENT_CONTINUE;
3426 }
3427
3428 if ((bufp == reinterpret_cast<TSMBuffer>(&((HttpSM *)txnp)->t_state.hdr_info.server_response)) &&
3429 (mloc == reinterpret_cast<TSMLoc>(((HttpSM *)txnp)->t_state.hdr_info.server_response.m_http))) {
3430 test->test_server_resp_get = true;
3431 SDK_RPRINT(test->regtest, "TSHttpTxnServerRespGet", "TestCase1", TC_PASS, "ok");
3432 } else {
3433 test->test_server_resp_get = false;
3434 SDK_RPRINT(test->regtest, "TSHttpTxnServerRespGet", "TestCase1", TC_FAIL, "Value's Mismatch");
3435 }
3436
3437 return TS_EVENT_CONTINUE;
3438}
3439
3440// This func is called by us from mytest_handler to test TSHttpTxnServerSsnTransactionCount
3441static int

Callers 1

mytest_handlerFunction · 0.85

Calls 2

TSHttpTxnServerRespGetFunction · 0.85
SDK_RPRINTFunction · 0.85

Tested by

no test coverage detected