Connection aborted sending file - how to find out why?

I have a program that sends a G-code file to OP according to the file upload documentation (as a POST with multipart form data). The socket is opened (Windows Sockets) and data is transferred, but part way through the send fails with connection aborted. OP's log file just shows a connection from the remote host, and connection closed (no other error messages). Does OP have any other way of debugging this situation, like an echo of what was received on the socket, or some more verbose logging? And/or is there any man-in-the-middle I can use to trap and log what goes across the connection?

If anyone is still reading this, I found the problem (using mitmproxy to log the HTTP requests). It seems the multipart form-data for the file upload requires a Content-Length: header. This is not made clear in the documentation.

EDIT: Issue #3786 addresses the doco update. Thank you!

1 Like