1. 03 3月, 2019 1 次提交
    • J
      remote-curl: use post_rpc() for protocol v2 also · a97d0079
      Jonathan Tan 提交于
      When transmitting and receiving POSTs for protocol v0 and v1,
      remote-curl uses post_rpc() (and associated functions), but when doing
      the same for protocol v2, it uses a separate set of functions
      (proxy_rpc() and others). Besides duplication of code, this has caused
      at least one bug: the auth retry mechanism that was implemented in v0/v1
      was not implemented in v2.
      
      To fix this issue and avoid it in the future, make remote-curl also use
      post_rpc() when handling protocol v2. Because line lengths are written
      to the HTTP request in protocol v2 (unlike in protocol v0/v1), this
      necessitates changes in post_rpc() and some of the functions it uses;
      perform these changes too.
      
      A test has been included to ensure that the code for both the unchunked
      and chunked variants of the HTTP request is exercised.
      
      Note: stateless_connect() has been updated to use the lower-level packet
      reading functions instead of struct packet_reader. The low-level control
      is necessary here because we cannot change the destination buffer of
      struct packet_reader while it is being used; struct packet_buffer has a
      peeking mechanism which relies on the destination buffer being present
      in between a peek and a read.
      Signed-off-by: NJonathan Tan <jonathantanmy@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a97d0079
  2. 23 2月, 2019 1 次提交
  3. 15 2月, 2019 3 次提交
  4. 14 2月, 2019 16 次提交
  5. 13 2月, 2019 6 次提交
  6. 12 2月, 2019 7 次提交
  7. 09 2月, 2019 6 次提交