Make subscription and filter cookies split into multiple cookies if they're too large #288
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.
Basically the title. This would fix #279. Also fixes a problem of empty cookies not being deleted.
This branch currently has subscriptions and filters split into
subscriptions
,subscriptions1
,filters
,filters1
, etc.Still left to figure out:
subscriptions
andfilters
cookies?Currently this only works if you don't have any old cookies. They still function, and if you change anything you'll get the new cookies with correct values. The problem is the old cookies stay and don't get updated. Would it be better to make this new system start withsubscriptions
and then the next cookie would besubscriptions1
in order to not break things? I started on it but it seemed like it was going to add more complexity than the next solution. Or would it be better to just convert to the new system and delete the oldsubscriptions
cookie if it exists? Seems like code that's eventually useless if we went that direction.join_until_size_limit()
be made smarter?Characters with accents like ã are more than one byte, but this only checks the length of the string. Are special characters even allowed in subreddit/user names?