ne_redirect_register(3)

ne_redirect_register3

Http request redirect handling

Usage

#include <ne_redirect.h>

void ne_redirect_register(ne_session *sess);

const ne_uri *ne_redirect_location(ne_session *sess);

Overview

The ne_redirect_register function registers redirect handling for the session. If a valid redirect (with status code 3xx) response is processed, the request will fail with the NE_REDIRECT error code. The destination of the redirect can then be retrieved using ne_redirect_location.

If a redirect was processed, the ne_redirect_location function returns the destination URI of the redirect.

Return value

ne_redirect_location returns NULL if no request has yet been processed, if the current request was not a redirect, or if the destination of the redirect could not be parsed or resolved. Otherwise it returns a pointer to an ne_uri object, which remains valid until another request is created for the session.

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

From neon 0.37.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.