- Jul 15, 2021
-
-
Vladimír Čunát authored
-
Vladimír Čunát authored
Now those type definitions can be simply loaded without any error, e.g. luajit daemon/lua/kres-gen.lua That will be useful for checking them without regenerating them.
-
- Jul 07, 2021
-
-
Tomas Krizek authored
The test attempts to use the timestamp 2050-12-31T23:59:59, which can't be represented with 32bit time_t due to Year 2038 problem.
-
- May 31, 2021
-
-
Tomas Krizek authored
The purpose of this change is to make it harder to accidentally use the legacy DoH implementation and free up the "doh" kind which may be used as an alias to a modern implementation in the future.
-
- May 25, 2021
-
-
Tomas Krizek authored
To (hopefully) improve readability, rename the typical macro usage of: if (!kr_assume(x)) y; // to if (kr_fails_assert(x)) y; As a convenience, replace the assert without a return value to a more simple version: (void)!kr_assume(x); // becomes kr_assert(x);
-
Default 5 minutes (but off). Randomize the delays +-25%.
-
Tomas Krizek authored
- add lua options debugging.assumption_abort and debugging.assumption_fork to make the behaviour configurable - select default values based on meson buildtype: - debug/debugoptimized (default, e.g. used in CI) - abort and don't fork - plain/release - don't abort, but fork if abort is user-configured
-
- May 24, 2021
-
-
Tomas Krizek authored
-
Tomas Krizek authored
Add HTTP headers to an optional kr_request.qsource.headers structure. Headers are stored as name, value string pairs. The following snippet can be used to access the headers in lua modules: ``` if (req.qsource.headers ~= nil) then for i = 1, tonumber(req.qsource.headers.len) do local name = ffi.string(req.qsource.headers.at[i - 1].name) local value = ffi.string(req.qsource.headers.at[i - 1].value) print(name, value) end end ``` Fixes #616
-
- Feb 11, 2021
-
-
Tomas Krizek authored
-
- Jan 27, 2021
-
-
Štěpán Balážik authored
It wasn't really used for a long time and became completely obsolete after !1030.
-
- Jan 25, 2021
-
-
Štěpán Balážik authored
Previously there where resolve_badmsg and resolve_error functions used to apply workarounds. This is now moved to selection.c and iterate.c just provides feedback using the server selection API. Errors are now handled centrally in selection.c:error.
-
- Dec 31, 2020
- Dec 08, 2020
-
-
Finally it does not rely on ordering in the answer. Stringification seemed like an easy hack for tests, let's see how it works in the long term.
-
- Dec 04, 2020
-
-
Jakub Ružička authored
In English, the final letter is doubled when a word of two or more syllables has stress on the final syllable so a correct form is "occurred".
-
- Nov 23, 2020
-
-
Tomas Krizek authored
-
- Nov 16, 2020
-
-
Vladimír Čunát authored
LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes but the C parts was using them as 64-bit inode variants. Consequently the `struct dirent` layout didn't match and we were getting filenames shifted by eight bytes. Now the whole dir-listing lua function is written in C.
-
- Nov 13, 2020
-
-
Tomas Krizek authored
-
- Nov 10, 2020
-
-
Vladimír Čunát authored
-
Vladimír Čunát authored
Logging strings: I originally wanted to have four chars inside [], but it doesn't really matter in these cases where logs don't happen within a request, so "[xdp]" won due to uniformity and simplicity.
-
- Nov 02, 2020
-
-
Petr Špaček authored
-
Petr Špaček authored
-
Petr Špaček authored
All strings should be properly escaped but some non-escaped versions were leaking into error messages.
-
Petr Špaček authored
Functions like trust_anchors.summary() return strings including tabs and newlines, so we do not escape those for human-readable output.
-
Petr Špaček authored
This change allows sandbox to pretty-print return values from functions which return multiple values, e.g. future net.bufsize() from MR !1026.
-
Petr Špaček authored
This slightly changes table_print() output format. table_print() output is not intended for machine consumption, use krprint.serialize_lua() or JSON for that purpose. Output from table_print is now a valid Lua expression if the input contains only serializable data types (number, string, bool, nil, table), which is nice for copy&pasting. Functions etc. are also pretty-printed but cannot be deserialized. Numbers are pretty-printed as well so their precision is reduced (as compared to krprint.serialize_lua).
-
Petr Špaček authored
-
Petr Špaček authored
-
Petr Špaček authored
Code was copied from Lua sandbox, the old copy is to be removed once new pretty-printer is finished.
-
Petr Špaček authored
At the moment it does not handle functions and other non-serializable types.
-
Petr Špaček authored
Side-effect is that keys are grouped by their type, so numbers come first and strings later..
-
Petr Špaček authored
-
- Oct 27, 2020
-
-
Petr Špaček authored
-
Petr Špaček authored
Error handling inside the test was incorrent and a detected error would blow up the test routine. Related: !1011, 3f5a826d
-
- Oct 26, 2020
-
-
Three instances send commands and DNS queries to each other.
-
Control protocol uses \n as command delimiter so we cannot allow \n inside commands. Users should be able to Lua-escape \n with \010.
-
For now we still attempt to support systems without lua-cqueues, e.g. Ubuntu 16.04. lua-http depends on lua-cqueues so the test for availability of lua-http at the beginning of kr_https_fetch() should cover lua-cqueues as well.