• 
      

    Fix rbt post for perforce repositories

    Review Request #4110 — Created May 7, 2013 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    Fix rbt post for perforce repositories.
    
    When using rbt post with perforce, if a change number was already in
    use there would be an error. We now detect the error, and update the
    associated review request.
    
    Also, we now only update drafts if needed in rbt post.
    
    rbt post would make an HTTP request to update the review request draft
    with fields even if there were none which required updating, resulting
    in an unnecessary empty HTTP PUT.
    
    A Content-Length header is now provided on empty requests.
    
    Some web servers require a Content-Length header be provided on all
    POST/PUT requests, when the API would make an empty POST/PUT request
    it was not providing this header. We now set a "0" Content-Length
    which should prevent these servers from responding with an HTTP 411.
    Have not tested with perforce yet, working on setting up a server. Testing by those who use perforce would be appreciated.