The page server's request headers. See wifi_req.h.
More...
#include "wifi_req.h"
#include <stdint.h>
#include <string.h>
#include "esp_log.h"
#include "lwip/sockets.h"
#include "sdkconfig.h"
|
| const char * | wifi_req_hdr (httpd_req_t *r, const char *key, char *out, size_t cap) |
| | Header key of r into out.
|
| static void | req_self (httpd_req_t *r, const char *name, wa_self_t *me) |
| | The panel as r may name it. The server's socket is IPv6 with IPv4 mapped into it when lwIP has IPv6 (CONFIG_LWIP_IPV6); a connection over IPv6 itself has no address a Host may name.
|
| 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.
|
|
|
static const char * | TAG = "wifi" |
| | The log tag, the component's.
|
The page server's request headers. See wifi_req.h.
SPDX-License-Identifier: MIT
◆ req_self()
| void req_self |
( |
httpd_req_t * | r, |
|
|
const char * | name, |
|
|
wa_self_t * | me ) |
|
static |
The panel as r may name it. The server's socket is IPv6 with IPv4 mapped into it when lwIP has IPv6 (CONFIG_LWIP_IPV6); a connection over IPv6 itself has no address a Host may name.
- Parameters
-
| r | the request |
| name | the panel's name |
| me | takes the panel |
◆ wifi_req_guard()
wa_guard() over r: the Host, the body's size, a write's Origin or Referer and the upload's header.
The panel's address is the IPv4 address the connection came in on: the access point's in AP, the station's in JOIN. A refusal is answered here, with no body and the connection closed, so a body not read is never read: httpd_req_delete() would read one to its end, a receive timeout at a time.
- Parameters
-
| r | the request |
| kind | what it is |
| name | the panel's name, "rcbench-1A2B" |
| bufs | the header buffers |
| e | takes the handler's return on a refusal |
- Returns
- true when the request may be answered
◆ wifi_req_hdr()
| const char * wifi_req_hdr |
( |
httpd_req_t * | r, |
|
|
const char * | key, |
|
|
char * | out, |
|
|
size_t | cap ) |
Header key of r into out.
- Parameters
-
| r | the request |
| key | the header's name |
| out | takes the value |
| cap | bytes of out |
- Returns
out; out holding "" for a value of cap bytes or more, which matches nothing; NULL for a header not sent or empty