Is your feature request related to a problem? Please describe.
When dealing with larger objects, putObject() cannot be used, because you need to render and size-check the cookie yourself.
Describe the solution you'd like
If a Cookie matching or exceeding 4K is detected when trying to write, an exception should be thrown.
To match all use cases, making this behavior a non-default cookie option might be a good idea.
Describe alternatives you've considered
So far you can work around this issue by not using putObject() and doing serialization and size checking manually.
Is your feature request related to a problem? Please describe. When dealing with larger objects, putObject() cannot be used, because you need to render and size-check the cookie yourself.
Describe the solution you'd like If a Cookie matching or exceeding 4K is detected when trying to write, an exception should be thrown. To match all use cases, making this behavior a non-default cookie option might be a good idea.
Describe alternatives you've considered So far you can work around this issue by not using putObject() and doing serialization and size checking manually.