DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
response.cpp File Reference

Response building for DetWebServer: template rendering, chunked/streaming responses, response headers + cookies, MIME typing, and the stats / Prometheus-metrics endpoints. More...

#include "dwserver.h"
#include "network_drivers/transport/tcp.h"
#include "server/dwserver_internal.h"
#include "shared_primitives/mime.h"
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Detailed Description

Response building for DetWebServer: template rendering, chunked/streaming responses, response headers + cookies, MIME typing, and the stats / Prometheus-metrics endpoints.

Split out of dwserver.cpp (single-purpose server files). The two-pass {{name}} template walk, the cross-loop chunked-send pump (paged like the file pump so a body is unbounded in constant memory), the per-response header/cookie buffer API, mime_type(), and the built-in stats/metrics handlers (rendered through the template engine from generated web assets). The chunked pump shares the per-slot SendCtx owned by dwserver.cpp. Behaviour is identical to the pre-split code.

Definition in file response.cpp.