Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_http_req.c File Reference
#include "nilorea/n_http_req.h"
#include "nilorea/n_log.h"
#include <string.h>
Include dependency graph for ex_http_req.c:

Go to the source code of this file.

Macros

#define PARSE_EX(s)
#define WANT(expr, want, msg)

Functions

int main (void)
static n_http_req_status parse (const char *s, n_http_request *out)

Variables

static int failures = 0

Macro Definition Documentation

◆ PARSE_EX

#define PARSE_EX ( s)
Value:
n_http_request_parse_ex((s), strlen(s), &lim, &r)
n_http_req_status n_http_request_parse_ex(const char *buf, size_t len, const n_http_req_limits *limits, n_http_request *out)
parse an HTTP/1.1 request head with caller-chosen limits
Definition n_http_req.c:110
Examples
ex_http_req.c.

Referenced by main().

◆ WANT

#define WANT ( expr,
want,
msg )
Value:
do { \
if ((expr) != (want)) { \
n_log(LOG_ERR, "FAIL: %s", (msg)); \
failures++; \
} \
} while (0)
static int failures
Definition ex_atlas.c:51
#define LOG_ERR
error conditions
Definition n_log.h:100
Examples
ex_http_req.c.

Definition at line 40 of file ex_http_req.c.

Referenced by main().

Function Documentation

◆ main()

◆ parse()

n_http_req_status parse ( const char * s,
n_http_request * out )
static
Examples
ex_http_req.c, and ex_markdown.c.

Definition at line 36 of file ex_http_req.c.

References n_http_request_parse().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ failures

int failures = 0
static

Definition at line 33 of file ex_http_req.c.