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

Method name_set

include/proxy/hdrs/MIME.h:944–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942 -------------------------------------------------------------------------*/
943
944inline void
945MIMEField::name_set(HdrHeap *heap, MIMEHdrImpl *mh, const char *name, int length)
946{
947 const char *name_wks;
948
949 if (hdrtoken_is_wks(name)) {
950 int16_t name_wks_idx = hdrtoken_wks_to_index(name);
951 mime_field_name_set(heap, mh, this, name_wks_idx, name, length, true);
952 } else {
953 int field_name_wks_idx = hdrtoken_tokenize(name, length, &name_wks);
954 mime_field_name_set(heap, mh, this, field_name_wks_idx, (field_name_wks_idx == -1 ? name : name_wks), length, true);
955 }
956}
957
958/*-------------------------------------------------------------------------
959 -------------------------------------------------------------------------*/

Calls 4

hdrtoken_is_wksFunction · 0.85
hdrtoken_wks_to_indexFunction · 0.85
mime_field_name_setFunction · 0.85
hdrtoken_tokenizeFunction · 0.85

Tested by

no test coverage detected