MDL-73588 curl: Fix expected CURLOPT_FILE behavior
commite3240e84314513ef04a52dfdabc757fb9041f25c
authorFrode Petterson <frode.andre.petterson@gmail.com>
Sun, 16 Jan 2022 22:28:25 +0000 (16 23:28 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 27 Jan 2022 11:18:52 +0000 (27 12:18 +0100)
tree207a69bcfdf014cf1a0206721e6eb0772ba3485b
parent3bd1f3824982025b15cdc685a5d1d508a8c811c9
MDL-73588 curl: Fix expected CURLOPT_FILE behavior

After cbf9dfb the CURLOPT_FILE no longer behaves as expected. All
redirect responses are appended to the same stream resource.  This fix
reverts back to the old behavior by setting the stream pointer back to
the beginning for each subsequent redirect.
lib/filelib.php
lib/tests/filelib_test.php