Skip to content

Commit

Permalink
Merge pull request #7 from nextcloud/master-guzzle
Browse files Browse the repository at this point in the history
[master] Update GuzzleHTTP to 5.3.1 in Git
  • Loading branch information
LukasReschke committed Jul 19, 2016
2 parents 73e2a28 + 7baee27 commit cba0f29
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 84 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"nikic/php-parser": "1.4.1",
"icewind/Streams": "0.4.1",
"swiftmailer/swiftmailer": "@stable",
"guzzlehttp/guzzle": "5.3.0",
"guzzlehttp/guzzle": "~5.3",
"league/flysystem": "1.0.20",
"pear/pear-core-minimal": "v1.10.1",
"interfasys/lognormalizer": "^v1.0",
Expand Down
22 changes: 8 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 54 additions & 60 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -931,66 +931,6 @@
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP"
},
{
"name": "guzzlehttp/guzzle",
"version": "5.3.0",
"version_normalized": "5.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "f3c8c22471cb55475105c14769644a49c3262b93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93",
"reference": "f3c8c22471cb55475105c14769644a49c3262b93",
"shasum": ""
},
"require": {
"guzzlehttp/ringphp": "^1.1",
"php": ">=5.4.0"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0",
"psr/log": "^1.0"
},
"time": "2015-05-20 03:47:55",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
]
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.0",
Expand Down Expand Up @@ -3067,5 +3007,59 @@
}
],
"description": "A set of generic stream wrappers"
},
{
"name": "guzzlehttp/guzzle",
"version": "5.3.1",
"version_normalized": "5.3.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/70f1fa53b71c4647bf2762c09068a95f77e12fb8",
"reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8",
"shasum": ""
},
"require": {
"guzzlehttp/ringphp": "^1.1",
"php": ">=5.4.0"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0"
},
"time": "2016-07-15 19:28:39",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
]
}
]
2 changes: 1 addition & 1 deletion guzzlehttp/guzzle/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
Copyright (c) 2011-2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 6 additions & 3 deletions guzzlehttp/guzzle/src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,12 @@ protected function getDefaultOptions()
'verify' => true
];

// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set
if ($proxy = getenv('HTTP_PROXY')) {
$settings['proxy']['http'] = $proxy;
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
// We can only trust the HTTP_PROXY environment variable in a CLI
// process due to the fact that PHP has no reliable mechanism to
// get environment variables that start with "HTTP_".
if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
$settings['proxy']['http'] = getenv('HTTP_PROXY');
}

if ($proxy = getenv('HTTPS_PROXY')) {
Expand Down
2 changes: 1 addition & 1 deletion guzzlehttp/guzzle/src/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
interface ClientInterface extends HasEmitterInterface
{
const VERSION = '5.3.0';
const VERSION = '5.3.1';

/**
* Create and return a new {@see RequestInterface} object.
Expand Down
3 changes: 1 addition & 2 deletions guzzlehttp/guzzle/src/Event/Emitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public function on($eventName, callable $listener, $priority = 0)
public function once($eventName, callable $listener, $priority = 0)
{
$onceListener = function (
EventInterface $event,
$eventName
EventInterface $event
) use (&$onceListener, $eventName, $listener, $priority) {
$this->removeListener($eventName, $onceListener);
$listener($event, $eventName);
Expand Down
2 changes: 1 addition & 1 deletion guzzlehttp/guzzle/src/Message/AbstractMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function setHeaders(array $headers)
{
$this->headers = $this->headerNames = [];
foreach ($headers as $key => $value) {
$this->setHeader($key, $value);
$this->addHeader($key, $value);
}
}

Expand Down
2 changes: 1 addition & 1 deletion guzzlehttp/guzzle/src/Message/MessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function createRequest($method, $url, array $options = [])
unset($options['config']);

// Use a POST body by default
if ($method == 'POST'
if (strtoupper($method) == 'POST'
&& !isset($options['body'])
&& !isset($options['json'])
) {
Expand Down

0 comments on commit cba0f29

Please sign in to comment.