Skip to content

Conversation

@nickvergessen
Copy link
Member

No description provided.

@nickvergessen nickvergessen added this to the Nextcloud Next milestone Jul 18, 2016
@mention-bot
Copy link

@nickvergessen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @LukasReschke, @DeepDiver1975 and @tanghus to be potential reviewers

@MorrisJobke
Copy link
Member

👍

@icewind1991
Copy link
Member

Wouldn't it be better to have an isUserAgent method (which accepts IRequest::ANDROID, etc) instead of exposing the implentation details of detection

@nickvergessen
Copy link
Member Author

We have a method isUserAgent which accepts an array of regexes. The problem is, you don't have the regexes publicly available to use them on this method.

I would also only consider the name public api, not the actual value?

@MorrisJobke
Copy link
Member

I would also only consider the name public api, not the actual value?

Could this be done by an abstract constant? Is this possible?

// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is unrelated to your PR, but what about IPv6?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open an ticket ;)

@ChristophWurst
Copy link
Member

Could this be done by an abstract constant? Is this possible?

No, according to http://php.net/manual/en/language.oop5.interfaces.php:

It's possible for interfaces to have constants. Interface constants works exactly like class constants except they cannot be overridden by a class/interface that inherits them.

@nickvergessen
Copy link
Member Author

I mean we could also add methods that then use isUserAgent(self::CONST) but I prefer those 3 consts over 3 new methods.

@LukasReschke
Copy link
Member

👍

@MorrisJobke MorrisJobke merged commit 544c3c1 into master Jul 19, 2016
@MorrisJobke MorrisJobke deleted the public-regex-to-match-our-clients branch July 19, 2016 09:35
R0Wi pushed a commit to R0Wi/server that referenced this pull request Nov 22, 2025
…tcloud#436)

After the previous PR(nextcloud#430) which added stopping application containers
feature when shutting down, as @andrey18106 correctly noted during our
1:1 conversation:

we cannot rely on the application inside the docker container to be
ready to process the request at the moment the docker container is
turned on.

This PR introduces handling of it by checking health-check and
heartbeat.

Signed-off-by: bigcat88 <bigcat88@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants