.\" 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 "TSMIMEHDRFIELDVALUESTRINGSET" "3ts" "Apr 16, 2024" "9.2" "Apache Traffic Server" .SH NAME TSMimeHdrFieldValueStringSet \- TSMimeHdrFieldValueStringSet API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSMimeHdrFieldValueStringSet(\fI\%TSMBuffer\fP bufp, \fI\%TSMLoc\fP hdr, \fI\%TSMLoc\fP field, int idx, const char *value, int length) .UNINDENT .SH DESCRIPTION .sp \fI\%TSMimeHdrFieldValueStringSet()\fP sets the value of a MIME field. The field is identified by the combination of \fIbufp\fP, \fIhdr\fP, and \fIfield\fP which should match those passed to the function that returned \fIfield\fP such as \fI\%TSMimeHdrFieldFind()\fP\&. The \fIvalue\fP is copied to the header represented by \fIbufp\fP\&. \fIvalue\fP does not have to be null terminated (and in general should not be). .sp If \fIidx\fP is non\-negative the existing value in the field is treated as a multi\-value and \fIidx\fP as the 0 based index of which element to set. For example if the field had the value \fBdave, grigor, tamara\fP and \fI\%TSMimeHdrFieldValueStringSet()\fP was called with \fIvalue\fP of \fBsyeda\fP and \fIidx\fP of 1, the value would be set to \fBdave, syeda, tamara\fP\&. If \fIidx\fP is non\-negative it must be the index of an existing element or exactly one past the last element or the call will fail. In the example case \fIidx\fP must be between \fB0\fP and \fB3\fP inclusive. \fI\%TSMimeHdrFieldValuesCount()\fP can be used to get the current number of elements. .sp This function returns \fI\%TS_SUCCESS\fP if the value was set, \fI\%TS_ERROR\fP if not. .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .