|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Shared single-range Range: bytes=... parser (RFC 7233), used by static file serving and the edge cache (PROTOCORE_ENABLE_RANGE).
More...
#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | HttpRangeNs |
| Dispatch table. Addressed by offset, so the layout is asserted below. More... | |
Functions | |
| PROTOCORE_NS_LAYOUT (HttpRangeNs, http_parse_byte_range) | |
| int | protocore_http_range_http_parse_byte_range (uint8_t *work, const char *hdr, size_t size, size_t *out_start, size_t *out_end) |
Parse a single-range Range: bytes=... header value against a . | |
Variables | |
| PROTOCORE_NS HttpRangeNs HttpRange | PROTOCORE_UNUSED |
| Module namespace. | |
Shared single-range Range: bytes=... parser (RFC 7233), used by static file serving and the edge cache (PROTOCORE_ENABLE_RANGE).
One owner for the range math, shared by the filesystem file server and the CDN edge cache. Pure and size/string-driven - no PC or fs:: dependency.
work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.
Definition in file http_range.h.
| PROTOCORE_NS_LAYOUT | ( | HttpRangeNs | , |
| http_parse_byte_range | |||
| ) |
| int protocore_http_range_http_parse_byte_range | ( | uint8_t * | work, |
| const char * | hdr, | ||
| size_t | size, | ||
| size_t * | out_start, | ||
| size_t * | out_end | ||
| ) |
Parse a single-range Range: bytes=... header value against a .
| work | PROTOCORE_HTTP_RANGE_BORROW bytes the caller took. Not held past the call. |
| hdr | Hdr |
| size | Size |
| out_start | Out start |
| out_end | Out end |
| PROTOCORE_NS HttpRangeNs HttpRange PROTOCORE_UNUSED |
Module namespace.
Definition at line 51 of file http_range.h.