remote-curl: fix large pushes with GSSAPI
commitc80d96ca0c3cf948c5062bf6591a46c625620b6d
authorBrian M. Carlson <sandals@crustytoothpaste.net>
Thu, 31 Oct 2013 06:36:51 +0000 (31 02:36 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Oct 2013 17:13:40 +0000 (31 10:13 -0700)
treef37dbe101264374be04dc169a1c86a7143177f56
parent3a347ed70727cdcb447040705b4128304c0244e3
remote-curl: fix large pushes with GSSAPI

Due to an interaction between the way libcurl handles GSSAPI
authentication over HTTP and the way git uses libcurl, large
pushes (those over http.postBuffer bytes) would fail due to
an authentication failure requiring a rewind of the curl
buffer.  Such a rewind was not possible because the data did
not fit into the entire buffer.

Enable the use of the Expect: 100-continue header for large
requests where the server offers GSSAPI authentication to
avoid this issue, since the request would otherwise fail.
This allows git to get the authentication data right before
sending the pack contents.  Existing cases where pushes
would succeed, including small requests using GSSAPI, still
disable the use of 100 Continue, as it causes problems for
some remote HTTP implementations (servers and proxies).

Signed-off-by: Brian M. Carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
remote-curl.c