Change By: Narayan Kamath (12/Nov/13 4:39 PM)
Summary: line-ending mismatch between the Jenkins  multipart form data submittal through Json is broken  HTTP server implementation and the HTTP specification
Description: 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.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to