Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_request_path.h File Reference

Declares request target normalization helpers. More...

Go to the source code of this file.

Functions

Request path helpers
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.

Detailed Description

Declares request target normalization helpers.

Definition in file native_request_path.h.

Function Documentation

◆ native_request_path_without_query()

char * native_request_path_without_query ( const char * target)

Removes the query string component from a request target.

Parameters
targetRaw request target.
Returns
Newly allocated path without the query string, or NULL on failure.

Definition at line 19 of file native_request_path.c.

References dup_range(), and len.

Referenced by serve_runtime_stack_native().

◆ native_request_target_for_mount()

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.

Parameters
mount_pathApp mount path configured for the runtime.
targetRaw request target.
Returns
Newly allocated remapped target, or NULL on failure.

Definition at line 26 of file native_request_path.c.

References native_request_path_strdup.

Referenced by handle_app_or_runtime_request().