diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 343e5397772b3..6434638b69d15 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2074,6 +2074,7 @@ void _php_setup_easy_copy_handlers(php_curl *ch, php_curl *source) curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch); curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch); curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch); + curl_easy_setopt(ch->cp, CURLOPT_DEBUGDATA, (void *) ch); if (source->handlers->progress) { ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); diff --git a/ext/curl/tests/curl_copy_handle_basic_009.phpt b/ext/curl/tests/curl_copy_handle_basic_009.phpt new file mode 100644 index 0000000000000..11b1e810458d7 --- /dev/null +++ b/ext/curl/tests/curl_copy_handle_basic_009.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test curl_copy_handle() with CURLINFO_HEADER_OUT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Hello World! +Hello World! +string(21) "GET /get.inc HTTP/1.1" +Hello World! +Hello World! +string(21) "GET /get.inc HTTP/1.1"