summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_tstr.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-08-20http: Refactor out nxt_tstr_cond_t from the access log moduleZhidao HONG1-0/+8
This nxt_tstr_cond_t will be reused for the feature of adding "if" option to the "match" object. The two "if" options have the same usage.
2024-08-20var: Remove unused functions and structure fieldsZhidao HONG1-5/+0
2024-08-20var: Restrict nxt_tstr_query() to only support synchronous operationZhidao HONG1-2/+2
Initially, variable query was designed to accomodate both synchronous and asynchronous operations. However, upon consideration of actual requirements, we recognized that asynchronous support was not needed. The refactoring ensures that the success or failure of the variable query operation is now directly indicated by its return value. This change streamlines the function's usage and enhances code clarity, as it facilitates immediate error handling without the need for asynchronous callbacks or additional error checking functions. Note the patch only works for Unit native variables but not njs variables.
2024-05-24tstr: Constify the 'str' parameter to nxt_tstr_compile()Andrew Clayton1-1/+1
This allows you to then define strings like static const nxt_str_t my_str = nxt_string("string"); Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2023-06-19Variables refactoring.Zhidao HONG1-3/+3
This commit is to reimplement the variables with an unknown field such as $header_{name} to make the parsing more generic, it's a preparation for supporting response header variables.
2023-04-20HTTP: added basic URI rewrite.Zhidao HONG1-0/+1
This commit introduced the basic URI rewrite. It allows users to change request URI. Note the "rewrite" option ignores the contained query if any and the query from the request is preserverd. An example: "routes": [ { "match": { "uri": "/v1/test" }, "action": { "return": 200 } }, { "action": { "rewrite": "/v1$uri", "pass": "routes" } } ] Reviewed-by: Alejandro Colomar <alx@nginx.com>
2023-01-30NJS: adding the missing vm destruction.Zhidao HONG1-0/+2
This commit fixed the njs memory leak happened in the config validation, updating and http requests.
2022-11-20Basic njs support.Zhidao HONG1-2/+36
2022-11-20Var: separating nxt_tstr_t from nxt_var_t.Zhidao HONG1-0/+45
It's for the introduction of njs support. For each option that supports native variable and JS template literals introduced next, it's unified as template string. No functional changes.