// The empty string enables all available decoders and implicitly
// sets a matching 'Accept-Encoding' header.
$conf[\CURLOPT_ENCODING
] = '';
// But as the user did not specify any acceptable encodings we need
// to overwrite this implicit header with an empty one.
$conf[\CURLOPT_HTTPHEADER
][] = 'Accept-Encoding:';
} } if (!
isset($options['sink'
])) { // Use a default temp stream if no sink was set.
$options['sink'
] = \GuzzleHttp\Psr7\Utils::
tryFopen('php://temp', 'w+'
);
} $sink =
$options['sink'
];
if (!\
is_string($sink)) { $sink = \GuzzleHttp\Psr7\Utils::
streamFor($sink);
} elseif (!\
is_dir(\
dirname($sink))) { // Ensure that the directory exists before failing in curl.
throw new \
RuntimeException(\
sprintf('Directory %s does not exist for sink value of %s', \
dirname($sink),
$sink));
} else { $sink =
new LazyOpenStream($sink, 'w+'
);
} $easy->sink =
$sink;