Well, just in case, if anyone else sees this problem of homelessness ... I tracked the reason:
Root cause
A known issue in Netty 3.2.4-FINAL means that it responds with a 324 response if the request contains a cookie of 8053 bytes or more. This is known in the Play Framework community (see http://play.lighthouseapp.com/projects/57987/tickets/1618-long-cookies-with-double-quote-values-make-play-fail-before-the- request-is-handled ). You will notice that in the comment chain there the double-quote problem has been fixed, but the size problem remains.
My business
So how did I manage to create a cookie that is large? Answer: JQuery Datatable. This fantastic user interface element (no, really) has a โbStateSaveโ parameter that allows you to save the state (ordering, filtering, etc.) of the Tables in a cookie to improve user experience. A cookie for data is about 900 bytes. However, Datatables uses part of the path for the URL in the name of this cookie, so for each URL in your application you get a new cookie. Now just add the RESTful style URL, for example / item / show / 34 (where 34 is the object identifier) โโand hey-presto, one cookie of 900 bytes for each item you are viewing into the mix. This will soon break the 8K limit.
Answer
Overriding the datatables state cookie name is not trivial, but it is quite simple.
First add the following configuration to your datatable
"bStateSave": true, "fnStateSave": function(oSettings, oData) { save_dt_view(oSettings, oData); }, "fnStateLoad": function(oSettings) { return load_dt_view(oSettings); },
Then just provide javascript functions that will store and retrieve state using your own less accurate cookie name:
function save_dt_view (oSettings, oData) { $.cookie('DataTables_myCookie', JSON.stringify(oData)); } function load_dt_view (oSettings) { return JSON.parse( $.cookie('DataTables_myCookie') ); }
Thanks to bennybenben in this post for sample code that I cannibalised.