Closed egorsmkv closed 3 years ago
I am coding the following:
http_string_t path = http_request_header(request, "x-file-path"); http_string_t output_path = http_request_header(request, "x-output-path");
but getting wrong values from these variables, for example:
sds path_str = sdstrim(sdsnew(path.buf), "\n\r"); log_debug("Path: %s", path_str);
curl -vvvv -H "X-File-Path: /home/yehor/i_1.raw" -H "X-Output-Path: /home/yehor/test1" http://localhost:8080/task
2020-09-15 13:22:54.7908 DEBUG [rest.denoiser] Path: /home/yehor/i_1.raw X-Output-Path: /home/yehor/test1
http_string_t will not be null terminated. You need to use the len field along with buf to read it. This could probably be clearer in the documentation.
len
buf
I am coding the following:
but getting wrong values from these variables, for example: