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

Function checkHttpTxnClientRespGet

src/api/InkAPITest.cc:3363–3386  ·  view source on GitHub ↗

This func is called by us from mytest_handler to test TSHttpTxnClientRespGet

Source from the content-addressed store, hash-verified

3361
3362// This func is called by us from mytest_handler to test TSHttpTxnClientRespGet
3363static int
3364checkHttpTxnClientRespGet(SocketTest *test, void *data)
3365{
3366 TSMBuffer bufp;
3367 TSMLoc mloc;
3368 TSHttpTxn txnp = static_cast<TSHttpTxn>(data);
3369
3370 if (TSHttpTxnClientRespGet(txnp, &bufp, &mloc) != TS_SUCCESS) {
3371 test->test_client_resp_get = false;
3372 SDK_RPRINT(test->regtest, "TSHttpTxnClientRespGet", "TestCase1", TC_FAIL, "Unable to get handle to client response");
3373 return TS_EVENT_CONTINUE;
3374 }
3375
3376 if ((bufp == reinterpret_cast<TSMBuffer>(&((HttpSM *)txnp)->t_state.hdr_info.client_response)) &&
3377 (mloc == reinterpret_cast<TSMLoc>(((HttpSM *)txnp)->t_state.hdr_info.client_response.m_http))) {
3378 test->test_client_resp_get = true;
3379 SDK_RPRINT(test->regtest, "TSHttpTxnClientRespGet", "TestCase1", TC_PASS, "ok");
3380 } else {
3381 test->test_client_resp_get = false;
3382 SDK_RPRINT(test->regtest, "TSHttpTxnClientRespGet", "TestCase1", TC_FAIL, "Value's Mismatch");
3383 }
3384
3385 return TS_EVENT_CONTINUE;
3386}
3387
3388// This func is called by us from mytest_handler to test TSHttpTxnServerReqGet
3389static int

Callers 1

mytest_handlerFunction · 0.85

Calls 2

TSHttpTxnClientRespGetFunction · 0.85
SDK_RPRINTFunction · 0.85

Tested by

no test coverage detected