When sending a post request to a python CGI server via jquery, sometimes some of the arguments are clipped. When sending the same post request again the request is received in with complete data.
I have checked the chrome browser network requests and they show that request is being fully sent.
Here is an example of a partially sent request:
var message = {
"to": "test.user@gmail.com",
"sender": "test.user@gmail.com",
"code": "K96nhC4qnIvzcM3XzaIMwfwuRjBooyHZWwtM1hIE\n2rD2WuvZ4B3/2J0xfDstsj91B/K8i7V6gjx1l/Mm\nX5skxuy6ih63ChZN3IWZjIXDCZ1F3V15/7oYDlsa\n6rgueyzEuW87nQJAmAh2P7tFEC6SQxEu/rln8DNs\nMrGSQRdMRY2kmzyVlnKbWEuZ6yjJes7TKaQ2GhL7\nSvAP4DMRl1mKSwnA7qAaCHVqG9iCPqyjy2eKJN/C\nviF7kBavfAZqcMlyY76VyMVSg3zG7t1LUfUA"
}
And the same request fully sent:
var message = {
"to": "test.user@gmail.com",
"sender": "test.user@gmail.com",
"code": "K96nhC4qnIvzcM3XzaIMwfwuRjBooyHZWwtM1hIE\n2rD2WuvZ4B3/2J0xfDstsj91B/K8i7V6gjx1l/Mm\nX5skxuy6ih63ChZN3IWZjIXDCZ1F3V15/7oYDlsa\n6rgueyzEuW87nQJAmAh2P7tFEC6SQxEu/rln8DNs\nMrGSQRdMRY2kmzyVlnKbWEuZ6yjJes7TKaQ2GhL7\nSvAP4DMRl1mKSwnA7qAaCHVqG9iCPqyjy2eKJN/C\nviF7kBavfAZqcMlyY76VyMVSg3zG7t1LUfUAhsMN\nXWSoVzG/kmKJen3czBo74UT8s0eUXCtFa01Hfecv\nGbQVBHHlTCrz3y5IoOqUQQDHtzE5oke7TL46nv52\nhwr1Q0/Sc9+QXA+rd/iMOWKjEY+AfbizI5K6v4VJ\nlP6wEL1Wo49f5haAukgJ6kWjx4hI8dcwEKrM5kbR\nDqQ3nQuIAnYM+8NeMmfjgoS4ReovtjQPjN/dk+eP\nEGiF8XWkIHHuerORq/9PERxeitJcZEWWYSkmjPu9\n8mW4K3jSm0SG3LV+E6mOx3uycCYkh9O1mqfwBk+3\nEE8litsIJ84ivZ+FzPZsbI0u9w3zsKE="
}
Both examples are JSON formatted from server logs.
Here is the javascript:
$.post('cgi-bin/somescript.py', message, someCallback, 'text')