http: clear POSTFIELDS when initializing a slot
authorJunio C Hamano <redacted>
Tue, 26 Apr 2011 15:04:49 +0000 (08:04 -0700)
committerJunio C Hamano <redacted>
Tue, 26 Apr 2011 17:44:33 +0000 (10:44 -0700)
commit1e41827d2d5cf0e4c6ebff91958fa47d69b7ff42
tree00e0d20ad6cd841e25442c7e42176860ebb19dfc
parentde1a2fdd38b138c4e4fed6412783dcb74d63d2da
http: clear POSTFIELDS when initializing a slot

After posting a short request using CURLOPT_POSTFIELDS, if the slot
is reused for posting a large payload, the slot ends up having both
POSTFIELDS (which now points at a random garbage) and READFUNCTION,
in which case the curl library tries to use the stale POSTFIELDS.

Clear it as part of the general slot initialization in get_active_slot().

Heavylifting-by: Shawn Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
Acked-by: Shawn Pearce <redacted>
http.c
git clone https://git.99rst.org/PROJECT