I have created a Harbormaster build plan based on a “Make HTTP request” build step to trigger a build in Jenkins. It is a simple GET request for a Jenkins URL looking like http://buildserver/jenkins/buildByToken/...etc. However, when copy/pasting the URL, I have left an additional single space character at the end of the URL. Phabricator kept the additional space and included it verbatim in the HTTP request line, which caused Jenkins (or rather its Jetty server, I guess) to reject the request with “400 Bad Request”. And indeed, per RFC 7230 (chapter 3.1.1), only “single space” is allowed in the request line.
Steps to reproduce:
- Create a new build plan (Harbormaster, Manage Build Plans, Create Build Plan)
- Add a build step into the plan of the type Make HTTP Request. Enter any testable URL, but add a space after the URL (e.g. http://server/some/test ). Choose GET method and save the step.
- Run the plan manually (on any buildable entity).
Actual result:
- Phabricator makes an HTTP request having a request line of GET /some/test HTTP/1.0 (note two spaces between the request-target and HTTP-version).
Expected results:
- The additional whitespace at the end of the URL is either trimmed at save time (or prevented with a validator during edit), or ignored when making the HTTP request, so that Phabricator makes a valid HTTP request.
Running up-to-date Phabricator on stable, currently at:
- phabricator b0df33e6ecd715ae67552ce57030581b158f5623 (Sat, May 6) (branched from c8c23af84092e6e766e20cd7f46701fc0c823631 on origin)
- arcanist 20ad47f2733135603d57b57be3e13422397e8071 (Sat, May 6) (branched from 3c4735795a2963c5ddff6dceaf60122d01ca3dc0 on origin)
- phutil d02cc05931b02c684d4c729510090591ca45f951 (Sat, Apr 29) (branched from a900d7b63e954e221efe140f0f33d3d701524aae on origin)