-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: Remove unneccesary etag check #52546
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
Conversation
|
If it would work, we should save a few bytes by not retransferring something the client already has 😉 |
But it works already, because we set the etag on the response object, and then it is handled in https://github.com/nextcloud/server/blob/master/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php ? The only advantage of doing it manually would be to save computation, if I can generate the etag, without retrieving/building the data, but that is not the case here, the processing happens always. The PHPUnit tests are failing, because we don't wire up the middleware (and also the header name needs to be changed), like in
But IMO we should just remove the tests, as we are otherwise just testing what the middleware-test already tests!? |
8c67164 to
f590fad
Compare
Signed-off-by: Marcel Müller <[email protected]>
f590fad to
1addd35
Compare
Yes. It would be nice though to keep a modified version of the test to assert that the logout url is ignored. According to #8652 (comment) that url changes and is therefore excluded. |
|
It's super weird to return the logout url in the api response. The requesttoken is bound to the current session and therefore will not work somewhere else 🤷 |
Signed-off-by: Marcel Müller <[email protected]>
|
@kesselb That's what you had in mind? |
/navigation/appsnot working #52278Summary
The etag check is neither useful (as the computation is already done at that point), nor is it working correctly.