Skip to content
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

Support ETags for /ocs/v2.php/cloud/users/{userId} endpoint (or all ocs endpoints?) #26947

Open
stefan-niedermann opened this issue May 11, 2021 · 1 comment

Comments

@stefan-niedermann
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
Motivation is to keep the transmitted data traffic from clients to the server as low as possible for 1. a better performance and 2. to preserve mobile traffic

Describe the solution you'd like
Support ETags in all ocs endpoints by default, but i will already be happy if this endpoint supports it:
/ocs/v2.php/cloud/users/{userId}

Describe alternatives you've considered
Not implementing human readable display names but technical user IDs because it's not worth the traffic without ETags in the Notes app.

Additional context
Some time ago someone already implemented this for the capabilities endpoint, maybe it's just a bit copy & paste...

cc @nickvergessen who pointed me here: https://github.com/nextcloud/notifications/blob/5ac74461141d8992bf1fb22c6e5fabf0544e5db1/lib/Controller/EndpointController.php#L128

@kesselb
Copy link
Contributor

kesselb commented May 13, 2021

Some time ago someone already implemented this for the capabilities endpoint,

#20722

maybe it's just a bit copy & paste...

Yeah. We should introduce a proper way to do it. Otherwise this kind of change is done in every controller. We talked about a middleware to automatically calculate the etag for each response. But we still need some allow-/blocklist for exclude responses.

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of client: 🤖🍏 mobile performance 🚀 and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants