Correctly handle emtpy string in proxyuserpwd config#16644
Correctly handle emtpy string in proxyuserpwd config#16644sshambar wants to merge 0 commit intonextcloud:masterfrom sshambar:master
Conversation
rullzer
left a comment
There was a problem hiding this comment.
This is cleaner IMO. since it sets the correct default
|
server/tests/lib/Http/Client/ClientTest.php Lines 56 to 65 in effca30 @rullzer do you know why these tests are not failing? |
I think because null is not matched exactly in the with statement... |
ChristophWurst
left a comment
There was a problem hiding this comment.
empty might also have done the trick but this is fine :)
Thanks a lot!
one could then try $this->config
->expects($this->at(1))
->method('getSystemValue')
->with($this->equalTo('proxyuserpwd'), $this->equalTo(null))
->willReturn(null); That might help in case phpunit filters out empty args. |
|
Ah my bad. pushed wrong. let me create a proper branch. |
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 [email protected]