I managed to find the file to increase the maximum length in webrick (1.9.2). I changed the hardcoded numbers at lines 246 and 247. You can find the file: ruby-directory/lib/ruby/<version number here>/webrick/httprequest.rb, though i found the file is quite different in ruby 1.8.7.
I was looking for this, and apparently, the only way you can fix it is to change the hardcoded values in webrick. Either change to a different development webserver, or just hack it.