Merged
Conversation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
rullzer
approved these changes
Mar 5, 2018
MorrisJobke
reviewed
Mar 5, 2018
| $navigation = $this->rewriteToAbsoluteUrls($navigation); | ||
| } | ||
| return new DataResponse($navigation); | ||
| $etag = md5(json_encode($navigation)); |
Member
There was a problem hiding this comment.
I get everytime a new etag, because the logout URL is dynamic:
[
{
"type": "settings",
"id": "settings",
"order": 1,
"href": "/index.php/settings/user",
"name": "Einstellungen",
"icon": "/settings/img/admin.svg",
"active": false,
"classes": ""
},
{
"type": "settings",
"id": "core_apps",
"order": 3,
"href": "/index.php/settings/apps",
"icon": "/settings/img/apps.svg",
"name": "Apps",
"active": false,
"classes": ""
},
{
"type": "settings",
"id": "core_users",
"order": 4,
"href": "/index.php/settings/users",
"name": "Benutzer",
"icon": "/settings/img/users.svg",
"active": false,
"classes": ""
},
{
"type": "settings",
"id": "help",
"order": 5,
"href": "/index.php/settings/help",
"name": "Hilfe",
"icon": "/settings/img/help.svg",
"active": false,
"classes": ""
},
{
"type": "settings",
"id": "logout",
"order": 99999,
"href": "http://localhost:8000/index.php/logout?requesttoken=0uDLjqUDfmx/MzvQzZhbmOqIlhEksOYx10axFnRuTI4%3D%3AhKiJwulSCwgMBhCz//8P7N6%2B/0BDgJ50sgXfTBMhNuc%3D",
"name": "Abmelden",
"icon": "/core/img/actions/logout.svg",
"active": false,
"classes": ""
}
]
Member
Author
There was a problem hiding this comment.
Oh right, thanks. I've pushed a fix to just use the list of 'id' entries to generate the ETag.
Codecov Report
@@ Coverage Diff @@
## master #8652 +/- ##
=============================================
- Coverage 51.81% 34.99% -16.82%
- Complexity 25354 25366 +12
=============================================
Files 1606 1606
Lines 95077 95101 +24
Branches 1378 1378
=============================================
- Hits 49260 33284 -15976
- Misses 45817 61817 +16000
|
MorrisJobke
reviewed
Mar 5, 2018
| } | ||
| return new DataResponse($navigation); | ||
|
|
||
| $etag = md5(json_encode(array_column($navigation, 'id'))); |
Member
There was a problem hiding this comment.
But now changed names (especially for external sites entries) or changed URLs don't trigger anymore. I would just have a blacklist of entries that get cleared because they basically kill the etag and remove them before generating the etag.
Member
Author
There was a problem hiding this comment.
Ok, makes sense. Fixed.
ec91e9c to
6e4424c
Compare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6e4424c to
11b6cc3
Compare
Member
|
CI fails, for example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ETag to NavigationController and return proper not modified status.
For nextcloud/desktop#195