Fix posting multi-part form data to GitLab and other services.

Review Request #9143 — Created Aug. 21, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
80ed375...

Reviewers

When posting data to a hosting service over HTTP POST, we construct a
multi-part form data payload, but we do so a bit incorrectly in that
we've left off the trailing boundary.

Most HTTP form-handling implementations are pretty relaxed about their
parsing of HTTP form data and don't seem to mind us leaving this off.
However, GitLab (or some component/configuration of GitLab, as this is
not universal) does have a problem with it and ends up returning a
HTTP 502 Bad Gateway error.

This is easily fixed by just adding the trailing boundary in all
payloads. This fixes GitLab and should help avoid problems down the road
with other services.

Tested with a customer and verified that the addition of this line fixed
their GitLab problem.