Title: [210625] trunk/Websites/perf.webkit.org
- Revision
- 210625
- Author
- [email protected]
- Date
- 2017-01-11 22:50:16 -0800 (Wed, 11 Jan 2017)
Log Message
fetch-from-remote doesn’t work with some websites
https://bugs.webkit.org/show_bug.cgi?id=166963
Reviewed by Yusuke Suzuki.
Apparently file_get_contents is not compatible with some SSL/TLS connections.
Use curl_* functions to access remote servers instead.
* public/admin/fetch-from-remote.php:
(fetch_remote):
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (210624 => 210625)
--- trunk/Websites/perf.webkit.org/ChangeLog 2017-01-12 06:16:42 UTC (rev 210624)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2017-01-12 06:50:16 UTC (rev 210625)
@@ -1,3 +1,16 @@
+2017-01-11 Ryosuke Niwa <[email protected]>
+
+ fetch-from-remote doesn’t work with some websites
+ https://bugs.webkit.org/show_bug.cgi?id=166963
+
+ Reviewed by Yusuke Suzuki.
+
+ Apparently file_get_contents is not compatible with some SSL/TLS connections.
+ Use curl_* functions to access remote servers instead.
+
+ * public/admin/fetch-from-remote.php:
+ (fetch_remote):
+
2017-01-10 Ryosuke Niwa <[email protected]>
Another build fix. Always use UTC when expressing commit times in UNIX-epoch timestamps.
Modified: trunk/Websites/perf.webkit.org/public/admin/fetch-from-remote.php (210624 => 210625)
--- trunk/Websites/perf.webkit.org/public/admin/fetch-from-remote.php 2017-01-12 06:16:42 UTC (rev 210624)
+++ trunk/Websites/perf.webkit.org/public/admin/fetch-from-remote.php 2017-01-12 06:50:16 UTC (rev 210625)
@@ -33,9 +33,18 @@
if ($auth)
$header = 'Authorization: Basic ' . base64_encode($auth['username'] . ':' . $auth['password']);
- $context = stream_context_create(array('http' => array('method' => 'GET', 'header' => $header)));
+ $channel = curl_init();
+ curl_setopt($channel, CURLOPT_URL, $remote_url);
+ if ($auth) {
+ curl_setopt($channel, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+ curl_setopt($channel, CURLOPT_USERPWD, $auth['username'] . ':' . $auth['password']);
+ }
+ curl_setopt($channel, CURLOPT_HEADER, FALSE);
+ curl_setopt($channel, CURLOPT_RETURNTRANSFER, TRUE);
+ $content = curl_exec($channel);
+ curl_close($channel);
- return @file_get_contents($remote_url, false, $context);
+ return $content;
}
main(array_get($_SERVER, 'REQUEST_URI', ''));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes