In my previous post I mentioned that default application server settings had fairly low limits to the size of HTTP headers they will support (e.g. Glassfish 2 is limited to 4KB). Well, having hit that limit in the experimentations I described previously, we looked at how one can increase such parameter in Glassfish. Here’s a recipe my good friend Marc gave me:

 Here’s how to configure a larger buffer size:

  • start glassfish
  • bring up the admin console
  • navigate to Configuration->HTTP Service->HTTP Listeners->http-listener-1
  • add a property to the table at the bottom of the page bufferSize=8192 (or whatever size you want)
  • make sure you hit the return key to save the new property once you enter the value, you can double check that the change took by navigating away from the current page and then back again
  • restart glassfish

That’s it…