Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_static_serve.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Declares native static artifact serving helpers.
4 */
5
6#ifndef PHAROS_NATIVE_STATIC_SERVE_H
7#define PHAROS_NATIVE_STATIC_SERVE_H
8
9#include "native_connection.h"
10#include "native_http_request.h"
11
12/** @name Native static serving helpers
13 * @{
14 */
15/**
16 * @brief Serves one static artifact response from a root directory.
17 * @param connection Connection receiving the response.
18 * @param root Artifact root directory.
19 * @param path Request target path.
20 * @param request Parsed request metadata.
21 * @param log_path Log path used for access and error logging.
22 * @return Final HTTP status code, or a negative value on connection write failure.
23 */
24int native_serve_static_file(NativeConnection *connection, const char *root, const char *path, const HttpRequest *request, const char *log_path);
25
26/** @} */
27#endif
Declares the native connection abstraction and transport metadata helpers.
Declares the parsed HTTP request record and request parsing helpers.
int native_serve_static_file(NativeConnection *connection, const char *root, const char *path, const HttpRequest *request, const char *log_path)
Serves one static artifact response from a root directory.
Parsed HTTP request fields extracted from a native connection.
Accepted client connection and its resolved transport metadata.