1 Struct N_HTTP_SERVER_REQUEST
gullradriel edited this page 2026-10-25 10:46:33 +01:00

N_HTTP_SERVER_REQUEST

Module: HTTP SERVER: TLS or plain HTTP/1.1, deadlines, limits, keep-alive

a request as the handler sees it (fields are read-only)

#include "n_http_server.h"

Public Attributes

Name
int tls
non-zero over TLS
char[2048u+2] target
private: storage for path and query
const char * raw
the raw head, for n_http_server_header()
size_t query_len
length of query
const char * query
the query string without '?
const char * peer_ip
peer address as text
size_t path_len
length of path
const char * path
the path, without the query string, still percent-encoded
n_http_request head
the parsed head (method, version_minor, content_length, headers)
void * conn
private: the connection
int body_status
after a failed body read: the status to answer (408, 413...)

Public Attributes Documentation

variable tls

int tls;

non-zero over TLS

variable target

char[2048u+2] target;

private: storage for path and query

variable raw

const char * raw;

the raw head, for n_http_server_header()

variable query_len

size_t query_len;

length of query

variable query

const char * query;

the query string without '?

', "" when there is none

variable peer_ip

const char * peer_ip;

peer address as text

variable path_len

size_t path_len;

length of path

variable path

const char * path;

the path, without the query string, still percent-encoded

variable head

n_http_request head;

the parsed head (method, version_minor, content_length, headers)

variable conn

void * conn;

private: the connection

variable body_status

int body_status;

after a failed body read: the status to answer (408, 413...)