Skip to content

Commit 19087b5

Browse files
committed
verbose output
1 parent a0ea651 commit 19087b5

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

packages/playground/remote/src/lib/worker-thread.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,22 @@ try {
283283

284284
php.writeFile(
285285
joinPaths(docroot, 'test-curl.php'),
286-
`<?php
287-
$ch = curl_init();
288-
curl_setopt($ch, CURLOPT_URL, 'http://wordpress.org');
289-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
290-
$output = curl_exec($ch);
291-
var_dump($output);
292-
var_dump(curl_error($ch));
293-
curl_close($ch);
294-
`
286+
`<?php
287+
$ch = curl_init();
288+
curl_setopt($ch, CURLOPT_URL, 'http://wordpress.org');
289+
curl_setopt($ch, CURLOPT_VERBOSE, 1);
290+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
291+
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
292+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
293+
$streamVerboseHandle = fopen('php://stdout', 'w+');
294+
curl_setopt($ch, CURLOPT_STDERR, $streamVerboseHandle);
295+
$output = curl_exec($ch);
296+
var_dump($output);
297+
var_dump(curl_error($ch));
298+
curl_close($ch);
299+
`
295300
);
301+
296302
// Always install the playground mu-plugin, even if WordPress is loaded
297303
// from the OPFS. This ensures:
298304
// * The mu-plugin is always there, even when a custom WordPress directory

0 commit comments

Comments
 (0)