.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TSMIMEHDRFIELDCREATE" "3ts" "Nov 02, 2023" "9.2" "Apache Traffic Server" .SH NAME TSMimeHdrFieldCreate \- TSMimeHdrFieldCreate API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSMimeHdrFieldCreate(\fI\%TSMBuffer\fP bufp, \fI\%TSMLoc\fP hdr, \fI\%TSMLoc\fP *out) .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSMimeHdrFieldCreateNamed(\fI\%TSMBuffer\fP bufp, \fI\%TSMLoc\fP hdr, const char *name, int name_len, \fI\%TSMLoc\fP *out) .UNINDENT .SH DESCRIPTION .sp These functions create MIME fields in a MIME header. The header is specified by the combination of the buffer \fIbufp\fP and a location \fIhdr\fP\&. The header must be either created such as by \fI\%TSMimeHdrCreate()\fP or be an existing header found via a function such as \fI\%TSHttpTxnClientReqGet()\fP\&. .sp \fI\%TSMimeHdrFieldCreate()\fP creates a completely empty field which must be named before being used in a header, usually via \fI\%TSMimeHdrFieldNameSet()\fP\&. It is almost always more convenient to use \fI\%TSMimeHdrFieldCreateNamed()\fP which combines these two steps, creating the field and then setting the name to \fIname\fP\&. .sp For both functions a reference to the new field is returned via \fIout\fP\&. .sp The field created is not in a header even though it is in the same buffer. It can be added to a header with \fI\%TSMimeHdrFieldAppend()\fP\&. The field also has no value, only a name. If a value is needed it must be added explicitly with a function such as \fI\%TSMimeHdrFieldValueIntSet()\fP\&. .SH COPYRIGHT 2023, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .