-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP / Discussion] Add guzzle for proper proxy and SSL support #14913
Conversation
Especially a review from an API PoV would be welcome – any feedback welcome 😄 |
|
||
if ($xml == false) { | ||
if($response->getStatusCode() !== (int)200) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(int)200 ? 👻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Let me cast the status code at our wrapper level 🙈
be05f29
to
68237a4
Compare
*/ | ||
interface IResponse { | ||
/** | ||
* @return \OC\Http\Client\StreamInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OCP?
|
Yes. Jenkins is too stupid again for that 3rdparty repo. Great fun. Let's create again another PR in 3rdparty for that 😠 |
68237a4
to
6e0a55b
Compare
Did some rebasing on this PR and the 3rdparty one… Hopefully that is enough for Jenkins. |
Apparently not…… |
586d70c
to
94e856b
Compare
Refer to this link for build results (access rights to CI server needed): |
94e856b
to
5930337
Compare
5930337
to
3326eb0
Compare
I went digging further and discovered:
Thus I extended this PR and added proper proxy handling as well as SSL and certificate handling. Also ownCloud will now ship a list of root certificates to finally get rid of bug reports by those annoying users and enterprise distributions using 10 year old stuff (because the older the more secure!). Basically this means that if we merge this ownCloud 8.1 will be the first release that properly handles proxies and SSL……… cc @icewind1991 For input |
3326eb0
to
f71afc0
Compare
That said I'd really LOVE to have this in 8.1 before we have to wait yet again 4 months to have proper SSL and proxy support… Pretty annoying and would solve a lot of problems reported by users and customers… |
For discussion regarding API design: @MorrisJobke @DeepDiver1975 @PVince81 @th3fallen @Raydiation @icewind1991 @karlitschek @nickvergessen @bantu |
Will fix the failing tests (basically adjusting the constructor in the tests etc…) once we have agreed on an API design. |
🙌 Guzzle ftw |
@@ -651,7 +661,7 @@ function getDb() { | |||
|
|||
/** | |||
* Returns an instance of the HTTP helper class | |||
* | |||
* @deprecated Use \OCP\Http\Client\IClientService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Use getHTTPClientService()"
Well I guess it makes sense like that |
f71afc0
to
12144cd
Compare
Needs rebase |
162f9e4
to
a2cc98a
Compare
a2cc98a
to
5f044eb
Compare
@owncloud-bot Retest this please. |
The inspection completed: 20 new issues, 43 updated code elements |
This adds a wrapper around Guzzle to allow developers to perform HTTP requests using a somewhat saner API. Without this SSL and proxy support is basically broken in ownCloud as stated in #14913 (comment)
Todo
Requires owncloud-archive/3rdparty#167
Fixes #9054, #14963, #14840 and a lot of other issues
cc @bantu @nickvergessen @DeepDiver1975