diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-07 22:33:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-07 22:33:05 -0700 |
commit | fe42fe4bcaaf262082a982e43bca1d8cac5a706d (patch) | |
tree | 0400d85c7a4553f0957f7a84acd3466da2fa112c /http.c | |
parent | a9906723b23b058cffadaf5db9d87b67384c60c3 (diff) | |
parent | 3944ba0cb0ef5119dc9d1708c572855fca88fc43 (diff) | |
download | git-fe42fe4bcaaf262082a982e43bca1d8cac5a706d.tar.gz git-fe42fe4bcaaf262082a982e43bca1d8cac5a706d.tar.xz |
Merge branch 'ms/http-auth'
* ms/http-auth:
Allow curl to rewind the read buffers
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -44,6 +44,25 @@ size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, void *buffer_) return size; } +#ifndef NO_CURL_IOCTL +curlioerr ioctl_buffer(CURL *handle, int cmd, void *clientp) +{ + struct buffer *buffer = clientp; + + switch (cmd) { + case CURLIOCMD_NOP: + return CURLIOE_OK; + + case CURLIOCMD_RESTARTREAD: + buffer->posn = 0; + return CURLIOE_OK; + + default: + return CURLIOE_UNKNOWNCMD; + } +} +#endif + size_t fwrite_buffer(const void *ptr, size_t eltsize, size_t nmemb, void *buffer_) { size_t size = eltsize * nmemb; |