Skip to content

Conversation

@kesselb
Copy link
Collaborator

@kesselb kesselb commented Feb 24, 2019

$this->stack->push(Middleware::mapRequest(function (RequestInterface $request) {
return $request
->withHeader('User-Agent', 'Nextcloud Server Crawler');
}));

I was wondering about the code above because this way of setting the user agent is really complicated. Refactored the request options code a bit and removed the setDefaultOptions method. The only notable change is that it's now possible to overwrite the user agent.

@kesselb kesselb force-pushed the debt/cleanup-httpservice branch 2 times, most recently from a3f68c5 to fd6d24b Compare February 24, 2019 18:28
@ChristophWurst ChristophWurst added this to the Nextcloud 17 milestone Mar 1, 2019
@ChristophWurst ChristophWurst added the 2. developing Work in progress label Mar 1, 2019
kesselb added 2 commits April 16, 2019 21:13
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Get proxyuserpwd only if proxy not empty.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the debt/cleanup-httpservice branch from a428996 to fd1d853 Compare April 16, 2019 19:13
Changed the implementation for getProxyUri with
fd1d853

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>
@kesselb kesselb marked this pull request as ready for review April 16, 2019 20:26
@kesselb kesselb added 3. to review Waiting for reviews enhancement and removed 2. developing Work in progress labels Apr 16, 2019
@rullzer rullzer added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 17, 2019
@MorrisJobke MorrisJobke merged commit e55e425 into master Apr 18, 2019
@MorrisJobke MorrisJobke deleted the debt/cleanup-httpservice branch April 18, 2019 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants