Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions http1IsPathValidForMethod

1
2
3
4
5
6
7
8
module juptune.http.v1;

bool http1IsPathValidForMethod(
    const const char[] method, 
    const const char[] path, 
    Uri uri, 
    bool isProxyRequest = false
);

Documentation

ditto.

Override Functions http1IsPathValidForMethod

1
2
3
4
5
6
7
module juptune.http.v1;

bool http1IsPathValidForMethod(
    const const char[] method, 
    UriParseHints hints, 
    bool isProxyRequest = false
);

Documentation

ditto

Override Functions http1IsPathValidForMethod

1
2
3
4
5
6
7
module juptune.http.v1;

bool http1IsPathValidForMethod(
    const const char[] method, 
    const const char[] path, 
    bool isProxyRequest = false
);

Documentation

Checks whether the given path is valid for the given method, taking into account whether the request is being proxied or not.

Notes

HttpWriter and HttpReader already perform path validation, however keeping this logic private doesn't provide much benefit, so it's been made public.

This check should match the speficiation of Section 3.2 in RFC9112.

The overload that takes a UriParseHintsis provided for performance reasons, as it allows the caller to avoid parsing the path twice. It is unable to handle OPTIONS *however as '*' is not a valid RFC 3986 URI so a trivial check must be manually performed beforehand.

Additionally another overload is provided that returns the parsed URI with hints, as it is likely that the caller will need to parse the URI anyway.

Params

Returns

trueif the path is valid for the given method, falseotherwise.