Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Function kcHttpPutHeader

You can use the function kcHttpPutHeader to pass the name and value of an HTTP header field for the HTTP response.
The length of the header name and the length of the header value are each limited to 256 bytes. The number of header fields for an HTTP response is limited to 100. The total length of the headers, including the control characters (CLRF), is limited to 7,000 bytes.
The header name can be specified in any upper/lower case and is sent as it was specified. It is not recognized if the same header is passed multiple times. The values are therefore not summarized, but all headers are sent individually.

Some HTTP header fields are set by openUTM, if they are not passed by the application program. Some HTTP header fields are always set by openUTM and must not be passed by the application program.
See details in chapter "Setting of HTTP Headers".

This function may be called both in program unit and HTTP exit program. In the HTTP exit program, the function can only be called when processing the output message.
If this function is called in a program unit run, in the same program unit run an output message has to be supplied by MPUT and the service has to be finished else the header information is lost.

Function declaration kcHttpPutHeader
kc_http_retcode kcHttpPutHeader( char *  headerName,
                                 char *  headerValue
                               );
This function has following function parameter:
>>headerNameThe pointer to the name of the HTTP header field for the HTTP response.
>>headerValueThe pointer to the value of the HTTP header field for the HTTP response.
Description of returned value of function call:

KC_HTTP_OK

The function has successfully terminated.

KC_HTTP_FUNCTION_CALL_NOT_ALLOWED

The function was called by the KDCS program unit before the KDCS call INIT was executed or outside the HTTP exit program.

KC_HTTP_NO_HTTP_CLIENT

The calling service was not initiated by an HTTP client.

KC_HTTP_HEADER_NAME_NULL_OR_EMPTY

The pointer to the header name headerName is NULL or the header name is empty.

KC_HTTP_HEADER_VALUE_NULL_OR_EMPTY

The pointer to the header value headerValue is NULL or the header value is empty.

KC_HTTP_HEADER_NAME_TOO_LONG

The specified header name is too long.

KC_HTTP_HEADER_VALUE_TOO_LONG

The specified HTTP header value is too long.

KC_HTTP_HEADER_NOT_ALLOWED

The specified HTTP header name must not passed to UTM.

KC_HTTP_MAX_HEADER_COUNT

The maximum number of headers was exceeded.

KC_HTTP_MAX_HEADER_TOTAL_LENGTH

The maximum length of all headers including control characters was exceeded.

KC_HTTP_HEADER_NAME_NOT_PRINTABLE

The name contains a non printable character.

KC_HTTP_HEADER_VALUE_NOT_PRINTABLE

The value contains a non printable character.