With JMeter files can be sent successfully
Config:
Output (success):
But it doesn't work if changing the file name to a variable. Attended images you will find file path is set to ${logname}, which can be resolved correctly, but the content-length is incorrect.
After changing the file name to the variable, the http will response error message, saying "java.io.FileNotFoundException: ulog_5b9139cf-5542-42dc-ae76-7fde3a61c67b_235152af-feb7-4249-a168-12ed4abb426c_0.log (The system cannot find the file specified)".
I think the incorrect content-length led to server fail to read the file content. Is is right? How to fix it? Thanks.
Config: Output (failure): The filename is resolved correctly, but content length is incorrect: