|
print $self "Content-Length: $size$CRLF" if $size; |
Using send_file_response with empty file suppress "Content-Length" header line, because "if $size" contstruction treated as false.
Then library succsessfully complete operation with RC_OK code, but HTTP client waits data from server, and timeout occured as a result.
Removing "if $size" resolve this problem.