com web/qa: Add user agent here, too.: pulls/api.php

From: Date: Wed, 08 May 2013 10:32:35 +0000
Subject: com web/qa: Add user agent here, too.: pulls/api.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66866@lists.php.net to get a copy of this message
Commit: ffb5a77c04c3081ccdc662117fd3164d0a115673 Author: Johannes Schlüter <johannes@schlueters.de> Wed, 8 May 2013 12:32:35 +0200 Parents: 2f0f19f2fb9fc04c8e3d1561fb84e3738420ccae Branches: master Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=ffb5a77c04c3081ccdc662117fd3164d0a115673 Log: Add user agent here, too. Changed paths: M pulls/api.php Diff: diff --git a/pulls/api.php b/pulls/api.php index 148a6df..a878b3e 100644 --- a/pulls/api..php +++ b/pulls/api.php @@ -57,6 +57,10 @@ function do_http_request($url, $opts) { global $errors; + if (empty($opts['user_agent'])) { + $opts['user_agent'] = USER_AGENT; + } + $ctxt = stream_context_create(array('http' => $opts)); $actual_url = str_replace('https://', 'https://'.GITHUB_USER.':'.GITHUB_PASS.'@', $url);

« previous php.qa (#66866) next »