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

N_HTTP_FORM_PART

Module: HTTP FORMS: strict percent, query and urlencoded decoding

one part of a multipart/form-data body; the body is NOT copied

#include "n_http_form.h"

Public Attributes

Name
char[200+1] name
field name (non-empty, UTF-8, no control byte)
int has_filename
non-zero when the part carried a filename parameter (a file field)
char[255+1] filename
the filename as sent (UTF-8, no control byte, may be ""): untrusted, never use it as a path
char[127+1] content_type
the part's Content-Type as sent, "" when absent: untrusted
size_t body_off
body offset in the parsed buffer
size_t body_len
body length

Public Attributes Documentation

variable name

char[200+1] name;

field name (non-empty, UTF-8, no control byte)

variable has_filename

int has_filename;

non-zero when the part carried a filename parameter (a file field)

variable filename

char[255+1] filename;

the filename as sent (UTF-8, no control byte, may be ""): untrusted, never use it as a path

variable content_type

char[127+1] content_type;

the part's Content-Type as sent, "" when absent: untrusted

variable body_off

size_t body_off;

body offset in the parsed buffer

variable body_len

size_t body_len;

body length