• About TV's server
  • New in version 3.10
  • About the source code
  • About protocols/plugins
  • TV's server API
  • Protocol Initialisation
  • Protocol binding
  • Protocol Listening and handling
  • Protocol data storage
  • Control panel
  • Multi column list
  • Time and date
  • Http protocol functions
  • Unimplemented and/or replaced functions
  • EscapeAndSendValue function

    The EscapeAndSendValue function will escape special HTTP-header characters and URL characters as %XX and send the converted string to the client.

    Syntax

    int __stdcall EscapeAndSendValue(
    __in ProtocolSession *psess,
    __in ClientSession *sess,
    __in char *inputString,
    __in int timeout,
    __in int flags
    );

    Parameters

    psess [in]sess [in]inputString [in]timeout [in]flags [in]
    ValueMeaning
    REPLACE_SPACE_WITH_ADD_SIGN
    0x1
    The space will not be escaped as '%20', but it will be esacped as '+'.
    SKIP_SPECIAL_CHARS
    0x2
    Instead of escaping the special characters it will ignore (by not sending) those characters.
    DONT_REPLACE_PATH_CHARACTERS
    0x4
    The characters $&+,/:=@ will not be escaped.

    Return value

    This can be one of the following values:

    ValueMeaning
    CE_NOERR
    0
    No error.
    CE_NO_BUFFER_AVAILABLE
    1
    There is not enough free space available in the internal buffer.
    CE_CONNECTION_CLOSED
    2
    Cannot complete the request because the connection with the client has been closed.
    CE_UNKNOWN_ERROR
    3
    An error occurred and since the RSF_RETURN_ON_ERROR flag is set the function returns.
    CE_TIMEOUT
    4
    A timeout has occurred.

    Requirements

    Should be exported by -
    Minimum supported API 1.00
    Header tvsserver_base
    .h Library(x86) tvs_server_http_protocol
    _x86.lib Library(x64) tvs_server_http_protocol
    _x64.lib DLL(x86) tvs_server_http_protocol
    _x86.DLL DLL(x64) tvs_server_http_protocol
    _x64.DLL