summaryrefslogtreecommitdiffhomepage
path: root/src/test/nxt_unit_app_test.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-25Tests: fixed incorrect pointer assignment.Alejandro Colomar1-2/+2
If we don't update the pointer before copying the request body, then we get the behavior shown below. After this patch, "foo\n" is rightly appended at the end of the response body. Request: "GET / HTTP/1.1\r\nHost: _\nContent-Length: 4\n\nfoo\n" Response body: """ Hello world! foo est data: Method: GET Protocol: HTTP/1.1 Remote addr: 127.0.0.1 Local addr: 127.0.0.1 Target: / Path: / Fields: Host: _ Content-Length: 4 Body: """ Fixes: 1bb22d1e922c ("Unit application library.") Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
2022-10-03Renamed a couple of members of nxt_unit_request_t.Andrew Clayton1-1/+1
This is a preparatory patch that renames the 'local' and 'local_length' members of the nxt_unit_request_t structure to 'local_addr' and 'local_addr_length' in preparation for the adding of 'local_port' and 'local_port_length' members. Suggested-by: Zhidao HONG <z.hong@f5.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2021-10-28Moving request limit control to libunit.Max Romanov1-1/+1
Introducting application graceful stop. For now only used when application process reach request limit value. This closes #585 issue on GitHub.
2020-11-18Libunit: improving logging consistency.Max Romanov1-2/+0
Debug logging depends on macros defined in nxt_auto_config.h.
2020-11-01Fixed building test app without debug.Valentin Bartenev1-2/+8
Compilers complained about unused variables after 37e2a3ea1bf1.
2020-10-28Added threading to the libunit test app.Max Romanov1-22/+108
2018-08-06Unit application library.Max Romanov1-0/+191
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.