ne_set_session_flag

3

ne_set_session_flag

ne_get_session_flag

set and retrieve session flags

          #include <ne_request.h>

            void ne_set_session_flag
            ne_session *sess
            ne_session_flag flag
            int value

            int ne_get_session_flag
            ne_session *sess
            ne_session_flag flag

## Description

The `ne_set_session_flag` function enables or disables a session flag. Passing a non-zero `value` argument enables the flag, and zero disables it.

The following flags are defined:

`NE_SESSFLAG_PERSIST` (default on)

- disable this flag to prevent use of persistent connections

`NE_SESSFLAG_ICYPROTO` (default off)

- enable this flag to enable support for non-HTTP ShoutCast-style "ICY" responses

`NE_SESSFLAG_SSLv2`

- this flag is ignored

`NE_SESSFLAG_RFC4918` (default off)

- enable this flag to enable support for RFC4918-only WebDAV features; losing backwards-compatibility with RFC2518 servers

`NE_SESSFLAG_CONNAUTH` (default off)

- enable this flag if an RFC-violating connection-based HTTP authentication scheme is in use

`NE_SESSFLAG_TLS_SNI` (default on)

- disable this flag if a server is used which does not correctly support the TLS SNI extension

`NE_SESSFLAG_EXPECT100` (default off)

- enable this flag to enable the request flag `NE_REQFLAG_EXPECT100` for new requests

`NE_SESSFLAG_SHAREPOINT` (default off)

- enable this flag to use various workarounds to improve interoperability with SharePoint

`NE_SESSFLAG_STRICT` (default on)

- disable this flag to parse HTTP/1.1 messages without strict requirements introduced in RFC 7230 and later

## Return value

The `ne_get_session_flag` function returns zero if a flag is disabled, less than zero if the flag is not supported, or greater than zero if the flag is enabled.

## See also

ne_session_create, ne_set_request_flag.