Erro de Winsock 10053="WSAECONNABORTED" :
SOCKET_ERROR: An established connection was aborted by the software in your host machine.
O "software" mencionado é (muito provavelmente) Winsock em si.
Encontrou esta página , que tem uma excelente sinopse que parece cobrir exatamente o que você está encontrando nisso provavelmente o seu script não está formando um cabeçalho HTTP apropriado.
An HTTP POST is to be sent to an HTTP server.
The server begins reading the POST and notices that the HTTP request header is invalid.
It immediately sends an HTTP response (with an error status, perhaps status=400) and closes the connection without trying to continue reading the remainder of the HTTP request that is forthcoming.
Meanwhile, the client is still happily writing the remainder of the HTTP request to the socket. (Remember a TCP/IP socket connection needs to be closed from both sides. In this case, the server has closed its side, but the client is still pumping data into the half-open connection.)
The client finishes writing the HTTP POST to the socket — meaning that data has been buffered to Winsock. The client application then tries to read the HTTP response, but it cannot because the outgoing retransmission (of the buffered data by WinSock) failed and the socket connection was shutdown on the client side (by Winsock). Even though the HTTP server sent the response, it is lost and cannot be retrieved. The error your application will receive when trying to read the HTTP response on the socket is WSAECONNABORTED.