cOMS/http/HttpUri.h
Dennis Eichhorn 2059cc6e77
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
update
2025-06-14 19:10:16 +00:00

37 lines
820 B
C

/**
* Jingga
*
* @copyright Jingga
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
#ifndef COMS_JINGGA_HTTP_URI_H
#define COMS_JINGGA_HTTP_URI_H
#include "../stdlib/Types.h"
// WARNING: Be careful when changing order, members and types
// The current configuration is carefully chosen (see below)
struct HttpUri {
byte path_offset;
byte path_length;
uint16 parameter_offset;
uint16 parementers_length;
// A parameter consists of 2 values: n-th value = length; n+1-th value = offset
uint16 parementer_array_offset;
byte parameter_array_count;
byte fragment_length;
uint16 fragment_offset;
uint16 port;
};
FORCE_INLINE
const char* http_uri_path_get(const HttpUri* uri, const char* base) {
return base + uri->path_offset;
}
#endif