61#define HTTP_HEADER_INIT(h, http_class, size) \
62 ((void)memset((h), 0, (size)), \
63 (void)(((msg_common_t *)(h))->h_class = (http_class)), \
66#define HTTP_METHOD_NAME(method, name) \
67 ((method) == http_method_unknown ? (name) : http_method_name(method, name))
91#define HTTP_VERSION_CURRENT http_version_1_1
115 char const *fmt, ...);
126 int status,
char const *phrase,
145 void const *data, usize_t len);
150 char const *fmt, ...);
158 char const *version);
164 char const *version);
233 if (compact && h->sh_class->hc_short[0])
234 return h->sh_class->hc_short;
236 return h->sh_class->hc_name;
243 return h && h != HTTP_NONE ? h->sh_class->hc_size + (
char *)h : NULL;
261 return msg_separator_create(home);
http_date_t * http_date_create(su_home_t *home, http_time_t t)
Create an Date header object.
Definition http_basic.c:584
struct http_date_s http_date_t
@HTTP_HEADER http_content_type Content-Type header.
Definition http.h:123
http_date_t http_expires_t
@HTTP_HEADER http_expires Expires header.
Definition http.h:126
msg_content_length_t * msg_content_length_create(su_home_t *, uint32_t n)
HTTP message, methods, headers.
#define HTTP_PROTOCOL_TAG
HTTP protocol identifier.
Definition http.h:61
http_method_t
IDs for well-known HTTP methods.
Definition http.h:69
msg_payload_t http_payload_t
Entity-body.
Definition http.h:167
msg_separator_t http_separator_t
Separator line between headers and message contents.
Definition http.h:165
unsigned long http_time_t
Time in seconds since 01-Jan-1900.
Definition http.h:169
struct http_s http_t
HTTP message object.
Definition http.h:98
union http_header_u http_header_t
Any HTTP header - union of all possible HTTP headers.
Definition http.h:101
Macros for each HTTP header.
msg_pub_t * msg_public(msg_t const *msg, void *tag)
struct msg_hclass_s const msg_hclass_t
struct msg_mclass_s msg_mclass_t
struct tag_type_s const * tag_type_t