rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
wifi_req.h
Go to the documentation of this file.
1
8
9#ifndef RCBENCH_WIFI_REQ_H
10#define RCBENCH_WIFI_REQ_H
11
12#include <stdbool.h>
13#include <stddef.h>
14
15#include "esp_err.h"
16#include "esp_http_server.h"
17#include "wa_guard.h"
18
20typedef struct {
21 char host[64];
22 char origin[64];
23 char referer[128];
24 char upload[8];
26
36const char *wifi_req_hdr(httpd_req_t *r, const char *key, char *out,
37 size_t cap);
38
56bool wifi_req_guard(httpd_req_t *r, wa_req_kind_t kind, const char *name,
57 wifi_req_bufs_t *bufs, esp_err_t *e);
58
59#endif /* RCBENCH_WIFI_REQ_H */
Where wifi_req_guard() reads a request's headers into.
Definition wifi_req.h:20
char referer[128]
Definition wifi_req.h:23
char origin[64]
Definition wifi_req.h:22
char host[64]
Definition wifi_req.h:21
char upload[8]
Definition wifi_req.h:24
Which requests the Wi-Fi page answers at all: the Host header, the Origin or Referer of a write,...
wa_req_kind_t
What the request is to the guard.
Definition wa_guard.h:58
bool wifi_req_guard(httpd_req_t *r, wa_req_kind_t kind, const char *name, wifi_req_bufs_t *bufs, esp_err_t *e)
wa_guard() over r: the Host, the body's size, a write's Origin or Referer and the upload's header.
Definition wifi_req.c:69
const char * wifi_req_hdr(httpd_req_t *r, const char *key, char *out, size_t cap)
Header key of r into out.
Definition wifi_req.c:20