5 Struct N_HTTP_MULTIPART_PART
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_HTTP_MULTIPART_PART

Module: NETWORK ENGINE: connect, accept, send and recv wrappers. Network Queue, thread-safe add/get message, ssl/tls secured communications

a single part of a parsed multipart/form-data body

#include "n_network.h"

Public Attributes

Name
char * name
Content-Disposition form-field name, or "".
char * filename
Content-Disposition filename, or "".
char * disposition_extra
extra Content-Disposition parameters, appended verbatim after name (and filename) as written, without a leading separator: supply it including its own "; ".
char * content_type
the part's Content-Type, or ""
N_STR * body
the part's raw body bytes (binary-safe), or NULL

Public Attributes Documentation

variable name

char * name;

Content-Disposition form-field name, or "".

variable filename

char * filename;

Content-Disposition filename, or "".

variable disposition_extra

char * disposition_extra;

extra Content-Disposition parameters, appended verbatim after name (and filename) as written, without a leading separator: supply it including its own "; ".

NULL or "" adds nothing. RFC 7578 leaves a receiver's handling of repeated or unknown parameters open, so this exists for a caller that must reproduce a specific header exactly (a compatibility quirk, or an authorized test of how two parsers read the same part). n_http_parse_multipart does not populate it, so a parse/build round-trip drops it.

variable content_type

char * content_type;

the part's Content-Type, or ""

variable body

N_STR * body;

the part's raw body bytes (binary-safe), or NULL