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

Function TSMimeFieldValueSet

src/api/InkAPI.cc:1621–1636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1619}
1620
1621static void
1622TSMimeFieldValueSet(TSMBuffer bufp, TSMLoc field_obj, int idx, const char *value, int length)
1623{
1624 MIMEFieldSDKHandle *handle = reinterpret_cast<MIMEFieldSDKHandle *>(field_obj);
1625 HdrHeap *heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
1626
1627 if (length == -1) {
1628 length = strlen(value);
1629 }
1630
1631 if (idx >= 0) {
1632 mime_field_value_set_comma_val(heap, handle->mh, handle->field_ptr, idx, value, length);
1633 } else {
1634 mime_field_value_set(heap, handle->mh, handle->field_ptr, value, length, true);
1635 }
1636}
1637
1638static void
1639TSMimeFieldValueInsert(TSMBuffer bufp, TSMLoc field_obj, const char *value, int length, int idx)

Calls 2

mime_field_value_setFunction · 0.85

Tested by

no test coverage detected