Page 1 of 1

400 Bad Request

Posted: 2018-12-12 11:37
by bescott53
Hi Ahmad, I am receiving a lot of '400 Bad Request Request Header Or Cookie Too Large' errors on my applications.

I have increased the buffer header sizes but this error is still happening.

can you suggest a fix?

Re: 400 Bad Request

Posted: 2018-12-12 18:21
by dge
Yes we've found that annoying too. It's because the cookie names are rather long and web browsers have a data limit on cookies built in. The cookies store the settings of which columns are to be displayed for each table.

So we did three things as a workaround:
1) modded the code to shorten the cookie names so the prefix is just "c" instead of the default (sorry can't remember offhand where we did this)
2) used shorter table names so the cookie names are shorter
3) installed a browser plugin called "cookie editor" for firefox (and chrome?) that lets you delete cookies. Even after shortening the cookie names we do still have to delete some cookies once in a while. But it's quick and easy once you know how.

Hopefully Ahmad is working on a more elegant solution, but these are workarounds I can suggest for now.

David

Re: 400 Bad Request

Posted: 2018-12-13 10:07
by bescott53
thanks David,

Ahmad, can you point me in the direction to amend the prefix of the cookies?

Re: 400 Bad Request

Posted: 2018-12-13 12:08
by Bertv
I have the same problem: my application has more than 100 tables.
The cookies are saved in the generated script datalist.php
The default for expiring is 30 (days), I have did set it to -1, so the cookies are deleted immediately.
See the code
cookie_set.png
cookie_set.png (22.43 KiB) Viewed 4810 times

Re: 400 Bad Request

Posted: 2018-12-13 12:23
by bescott53
thanks Bert, does this cause any functionality issues (ie, hitting the backbutton, etc)

Re: 400 Bad Request

Posted: 2018-12-13 13:54
by Bertv
I did not find any problem, they only thing is: the cookie is not saved, so if you changed the display and hide some fields, the next time you visit the table all fields are visible again.
In a new version I made an exeption for some tables like
cookie_set.png
cookie_set.png (17.78 KiB) Viewed 4805 times

Re: 400 Bad Request

Posted: 2018-12-13 14:07
by bescott53
seems like a good workaround Bertv, appreciate you sharing!

Re: 400 Bad Request

Posted: 2018-12-19 20:46
by a.gneady
I've fixed this bug in the upcoming AppGini 5.73 ... sorry for the inconvenience.

Re: 400 Bad Request

Posted: 2018-12-20 21:44
by hubert
Hardly waiting for this new version and its improvements list !
XMas is in a few days !!!

Re: 400 Bad Request

Posted: 2019-01-03 14:31
by a.gneady
It got delayed for some time in order to perform more thorough testing. I hope we'll be able to release it before mid January.

Re: 400 Bad Request

Posted: 2019-01-07 22:09
by bescott53
thanks Ahmad, eagerly waiting on the newer version, keep up the good work