summaryrefslogtreecommitdiffstats
path: root/tests/lib/Http
Commit message (Collapse)AuthorAgeFilesLines
* Add well known handlers APIChristoph Wurst2020-12-163-0/+324
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Improve CertificateManager to not be user context dependentMorris Jobke2020-11-031-3/+3
| | | | | | | | | * removes the ability for users to import their own certificates (for external storage) * reliably returns the same certificate bundles system wide (and not depending on the user context and available sessions) The user specific certificates were broken in some cases anyways, as they are only loaded if the specific user is logged in and thus causing unexpected behavior for background jobs and other non-user triggered code paths. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Do not read certificate bundle from data dir by defaultMorris Jobke2020-05-251-3/+2
| | | | | | | | | | | 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-3/+7
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix unit testsJoas Schilling2020-04-151-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Check all remotes for local accessJoas Schilling2020-04-141-9/+122
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add support for GuzzleHTTP 'no' proxyMohammed Abdellatif2020-02-291-11/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [3rdparty] Bump guzzlehttp/guzzle from 6.3.3 to 6.5.2John Molakvoæ (skjnldsv)2020-02-112-26/+26
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Mode to modern phpunitRoeland Jago Douma2019-11-272-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-272-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add default timeout to expected request optionsDaniel Kesselberg2019-09-031-34/+19
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Correctly handle emtpy string in proxyuserpwd configScott Shambarger2019-08-111-2/+12
| | | | | | | | | | 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>
* Fix testGetProxyUriDaniel Kesselberg2019-04-161-6/+1
| | | | | | | | | | | Changed the implementation for getProxyUri with https://github.com/nextcloud/server/pull/14363/commits/fd1d85365cb1368fa70263fe3ae3b8e59ab56615 If proxy is already null then we don't ask for proxyuserpwd. Test failed because we expected getSystemValue to be called once with proxyuserpwd Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Set User-Agent as header without middlewareDaniel Kesselberg2019-04-162-39/+68
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix HTTP client given options being overriden by default optionsDaniel Calviño Sánchez2018-06-141-0/+127
| | | | | | | | | 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 httpclient to guzzle6Robin Appelman2018-02-093-46/+34
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #2912 from nextcloud/increase-coverage-response.phpLukas Reschke2017-01-021-3/+24
|\ | | | | Add 100% coverage for response.php
| * Add 100% coverage for response.phpLukas Reschke2017-01-021-3/+24
| | | | | | | | | | | | While already at https://github.com/nextcloud/server/pull/2911 I thought I can as well finish that one as well... Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | Rebrand to "Nextcloud" and add 100% coverageLukas Reschke2017-01-021-4/+67
|/ | | | | | Noticed while debugging https://github.com/nextcloud/server/issues/2910 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix getMock Http ClientRoeland Jago Douma2016-09-072-4/+7
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-203-0/+176
* Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader