When I submit using json the server responds with error 400, the same exact submittal with jenkins version 1.5.30 and below gives me a success. We looked at this some more and found this out .
The root of this problem is a line-ending mismatch between the Jenkins HTTP server implementation and the HTTP specification. The HTTP RFC specifies \r\n (CRLF, (Windows line endings)) to be the line endings for HTTP. However, almost all servers also support \n (UNIX line endings). Invoking the Jenkins' HTTP API on a linux machine directly via the 'curl' command line tool is happy with the \n line-endings (which curl defaults to on linux). However, forcing curl to use \r\n as its line endings causes the transaction to fail using the same error code the obs.py fails with.
Now, for the fun part (why we can't work around this easily) - We checked the underlying Python library httplib we use has \r\n hardcoded as that's what the HTTP specification calls for. There is no option to switch it to \n.