summaryrefslogtreecommitdiffstats
path: root/lib/private/Http/Client/Client.php
Commit message (Collapse)AuthorAgeFilesLines
* Fix option in the client code itself as wellRoeland Jago Douma2021-01-121-6/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Simple typo in commentsCarlos Ferreira2020-11-201-2/+2
|
* Always return the default path if we canRoeland Jago Douma2020-11-031-4/+0
| | | | | | | | Just check in the certifcate manager. So every part of the system that request the certificatebundle gets the defaullt one (the 99% case) if we can. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* parse_url returns null in case a parameter is not foundJoas Schilling2020-07-291-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Do not read certificate bundle from data dir by defaultMorris Jobke2020-05-251-7/+7
| | | | | | | | | | | Before the resources/config/ca-bundle.crt was only used when the list of custom certificates was empty and the instance was not installed. But it should also be used when the list is empty and the instance is installed. This is inverting the logic to stop if the instance is not installed to use the default bundle. And it also does this when the list is empty. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow gzip encoded requests by defaultMorris Jobke2020-05-201-0/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check all remotes for local accessJoas Schilling2020-04-141-5/+60
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+1
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add support for GuzzleHTTP 'no' proxyMohammed Abdellatif2020-02-291-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom config allows to setup a proxy URI that is passed to GuzzleHTTP client as request options. Guzzle has the option to receive an array of proxies for each URI scheme as well as 'no' key value pair to provide a list of host names that should not be proxied to. Guzzle would automatically populate these options with HTTPS_PROXY and NO_PROXY environment variables. However, when providing a 'proxy' request option, default values will be overriden and it is required to explicitly provide the 'no' value if needed. More info: http://docs.guzzlephp.org/en/stable/request-options.html#proxy This commit will add support for a new config 'proxyexclude', which takes a list of host names to be excluded. It will also provide 'proxy' request option as an array instead of a string to Guzzle, and populate 'http' and 'https' URI schemes with proxy URI, and 'no' with 'proxyexclude' list. Also, if no 'proxy' is configured, it will leave out 'proxy' request option, so it won't override Guzzle default values. Sample config file includes a hint on how to explicitly sync 'proxyexclude' with NO_PROXY, and a note about default values. Signed-off-by: Mohammed Abdellatif <m.latief@gmail.com>
* Update license headersChristoph Wurst2019-12-051-1/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Set a default request timeoutRoeland Jago Douma2019-09-021-0/+1
| | | | | | | | This to avoid endless running processes. A default timeout of 30 seconds should cover the 99% case. If a job need specific longer time it should set that. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Correctly handle emtpy string in proxyuserpwd configScott Shambarger2019-08-111-4/+4
| | | | | | | | | | As documented, the default value for config value proxyuserpwd is ''. However, that value results in the error: "cURL error 5: Unsupported proxy syntax in '@'". This patch handles the values of '' and null (the default in the code) the same for config values proxyuserpwd and proxy. Signed-off-by: Scott Shambarger <devel@shambarger.net>
* Refactor getProxyUriDaniel Kesselberg2019-04-161-9/+6
| | | | | | Get proxyuserpwd only if proxy not empty. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Set User-Agent as header without middlewareDaniel Kesselberg2019-04-161-55/+34
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix HTTP client given options being overriden by default optionsDaniel Calviño Sánchez2018-06-141-6/+6
| | | | | | | | | According to the array_merge documentation, "If the input arrays have the same string keys, then the later value for that key will overwrite the previous one." Thus, the default options must be the first parameter passed to array_merge. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* adjust post body for new guzzleRobin Appelman2018-02-091-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* adjust httpclient to guzzle6Robin Appelman2018-02-091-19/+40
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Make OCP\Http strictRoeland Jago Douma2018-01-161-13/+15
| | | | | | | | | | * Handle private files * Add return types * Add scalar typehints * Made strict * Fixed requiring proper guzzle message interface that is passed around Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Rebrand to "Nextcloud" and add 100% coverageLukas Reschke2017-01-021-5/+6
| | | | | | Noticed while debugging https://github.com/nextcloud/server/issues/2910 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix othersJoas Schilling2016-07-211-1/+2
|
* Update license headersLukas Reschke2016-05-261-1/+1
|
* only configure the http client once we start using itRobin Appelman2016-05-121-6/+23
|
* Move \OC\Http to PSR-4Roeland Jago Douma2016-04-281-0/+294