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

Function compare_field_names

src/api/InkAPITest.cc:4820–4837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4818//////////////////////////////////////////////
4819
4820TSReturnCode
4821compare_field_names(RegressionTest * /* test ATS_UNUSED */, TSMBuffer bufp1, TSMLoc mime_loc1, TSMLoc field_loc1, TSMBuffer bufp2,
4822 TSMLoc mime_loc2, TSMLoc field_loc2)
4823{
4824 const char *name1;
4825 const char *name2;
4826 int length1;
4827 int length2;
4828
4829 name1 = TSMimeHdrFieldNameGet(bufp1, mime_loc1, field_loc1, &length1);
4830 name2 = TSMimeHdrFieldNameGet(bufp2, mime_loc2, field_loc2, &length2);
4831
4832 if ((length1 == length2) && (strncmp(name1, name2, length1) == 0)) {
4833 return TS_SUCCESS;
4834 } else {
4835 return TS_ERROR;
4836 }
4837}
4838
4839REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
4840{

Calls 1

TSMimeHdrFieldNameGetFunction · 0.85

Tested by

no test coverage detected