---
name: "ne_set_session_flag"
section: "3"
platform: "linux"
package: "neon"
version: "0.37.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ne_set_session_flag"
---

# ne\_set\_session\_flag(3)

set and retrieve session flags

## NAME

ne\_set\_session\_flag, ne\_get\_session\_flag - set and retrieve session flags

## SYNOPSIS

```
#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**(3)](/ne_session_create/3.md), [**ne\_set\_request\_flag**(3)](/ne_set_request_flag/3.md).

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\
