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
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
Macros for each HTTP header.
msg_pub_t * msg_public(msg_t const *msg, void *tag)
struct msg_hclass_s const msg_hclass_t
Date, Expires, If-Modified-Since, If-Unmodified-Since, Last-Modified.
Definition http.h:219
Host.
Definition http.h:226
HTTP request line.
Definition http.h:179
HTTP message object.
Definition http.h:323
HTTP status line.
Definition http.h:189
struct tag_type_s const * tag_type_t