Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_request_path.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Declares request target normalization helpers.
4 */
5
6#ifndef PHAROS_NATIVE_REQUEST_PATH_H
7#define PHAROS_NATIVE_REQUEST_PATH_H
8
9/** @name Request path helpers
10 * @{
11 */
12/**
13 * @brief Removes the query string component from a request target.
14 * @param target Raw request target.
15 * @return Newly allocated path without the query string, or NULL on failure.
16 */
17char *native_request_path_without_query(const char *target);
18/**
19 * @brief Remaps a request target so it is relative to an app mount path.
20 * @param mount_path App mount path configured for the runtime.
21 * @param target Raw request target.
22 * @return Newly allocated remapped target, or NULL on failure.
23 */
24char *native_request_target_for_mount(const char *mount_path, const char *target);
25
26
27/** @} */
28#endif
char * native_request_path_without_query(const char *target)
Removes the query string component from a request target.
char * native_request_target_for_mount(const char *mount_path, const char *target)
Remaps a request target so it is relative to an app mount path.