author | Martin Storsjö <martin@martin.st> | |
Wed, 1 Apr 2009 16:48:24 +0000 (19:48 +0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Apr 2009 20:04:07 +0000 (13:04 -0700) | ||
commit | 3944ba0cb0ef5119dc9d1708c572855fca88fc43 | |
tree | da494b01663a7405ad7c53254aa7ba5b23ee6aeb | tree | snapshot |
parent | dffc13166ba8950b2ddbac2406042751f96841b7 | commit | diff |
Allow curl to rewind the read buffers
When using multi-pass authentication methods, the curl library may
need to rewind the read buffers (depending on how much already has
been fed to the server) used for providing data to HTTP PUT, POST or
PROPFIND, and in order to allow the library to do so, we need to tell
it how by providing either an ioctl callback or a seek callback.
This patch adds an ioctl callback, which should be usable on older
curl versions (since 7.12.3) than the seek callback (introduced in
curl 7.18.0).
Some HTTP servers (such as Apache) give an 401 error reply immediately
after receiving the headers (so no data has been read from the read
buffers, and thus no rewinding is needed), but other servers (such
as Lighttpd) only replies after the whole request has been sent and
all data has been read from the read buffers, making rewinding necessary.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When using multi-pass authentication methods, the curl library may
need to rewind the read buffers (depending on how much already has
been fed to the server) used for providing data to HTTP PUT, POST or
PROPFIND, and in order to allow the library to do so, we need to tell
it how by providing either an ioctl callback or a seek callback.
This patch adds an ioctl callback, which should be usable on older
curl versions (since 7.12.3) than the seek callback (introduced in
curl 7.18.0).
Some HTTP servers (such as Apache) give an 401 error reply immediately
after receiving the headers (so no data has been read from the read
buffers, and thus no rewinding is needed), but other servers (such
as Lighttpd) only replies after the whole request has been sent and
all data has been read from the read buffers, making rewinding necessary.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | diff | blob | history | |
http.c | diff | blob | history | |
http.h | diff | blob | history |