- need php_stream_open_wrapper_*ex* to pass a stream context
[m6w6/ext-http] / http_functions.c
index 1c63ba0d6b270f57dbe2a01a28d012e44b98fb59..8ce961fdac10ccdf666076eb2ad5bd7cda2db923 100644 (file)
@@ -1502,7 +1502,7 @@ PHP_FUNCTION(http_put_file)
                RETURN_FALSE;
        }
 
-       if (!(stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL))) {
+       if (!(stream = php_stream_open_wrapper_ex(file, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT))) {
                RETURN_FALSE;
        }
        if (php_stream_stat(stream, &ssb)) {