Files
seregonwar f19ac02d6f refactor(http): split the server into listener, stream, upload and json modules
The HTTP stack had grown into a single file that owned sockets, parsing,
uploads and every API domain.  Split it into focused modules (listener,
response stream, upload, json helpers) with the domain handlers next to the
APIs they serve, and cover framing, streaming and uploads with unit tests.
2026-09-30 17:50:36 +02:00

17 lines
640 B
C

#ifndef ZFTPD_HTTP_JSON_H
#define ZFTPD_HTTP_JSON_H
#include <stddef.h>
#include <stdint.h>
int http_buf_append_bytes(char *buf, size_t cap, size_t *pos,
const char *data, size_t len);
int http_buf_append_cstr(char *buf, size_t cap, size_t *pos, const char *str);
int http_buf_append_u64(char *buf, size_t cap, size_t *pos, uint64_t value);
int http_buf_append_u32(char *buf, size_t cap, size_t *pos, uint32_t value);
int http_buf_append_i32(char *buf, size_t cap, size_t *pos, int32_t value);
int http_json_escape_append(char *buf, size_t cap, size_t *pos,
const char *str);
#endif