Forum Discussion
fstrada
Oct 02, 2019Nimbostratus
Hi John,
I found the same issue.
In my case the problem was the Content-Lenght and I resolved it in this way:
I have created a JSON string and I have counted the length of it
set json_data "\{ \"ipAddress\" : \"$client_ip\", \"userAgent\" : \"$user_browser\" \}"
set cnt_length [string length $json_data]
After that I have populated the POST request
set data "POST /test HTTP/1.1\r\nHost: www.test-acme.local\r\nAuthorization: Basic cGlwcG86cGx1dG8=\r\nContent-type: application/json\r\nContent-Length: $cnt_length\r\n\r\n$json_data"
set send_info [send -timeout 3000 -status send_status $conn $data]
I hope this help you.
Sorry for my terrible english