There is a post limit in Internet Explorer of 3926 characters. How can I bypass this?
I've been troubleshooting this error for 12 hours now, and I think I have this narrowed down to this.
If I supply a post method, whether its a json object or a string, IE will allow anything up to ~3926 characters. Nothing else, no matter what shape or size its in. This is so long as its being passed like so :
<form method="post" action="/generate_csv.csv?calc[][amount_paid]=0.0&calc[][date_awarded]=02%2F02%2F1981&calc[][date_paid]=12%2F31%2F1981&calc[][interest_rate]=12.0&calc[][principal]=1955.96&calc[][tf]=0.912328767123288&calc[][total_interest]=214.14&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1982&calc[][date_paid]=12%2F31%2F1982&calc[][interest_rate]=12.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=234.72&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1983&calc[][date_paid]=12%2F31%2F1983&calc[][interest_rate]=12.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=23开发者_JAVA技巧4.72&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1984&calc[][date_paid]=12%2F31%2F1984&calc[][interest_rate]=12.0&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=235.36&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1985&calc[][date_paid]=12%2F31%2F1985&calc[][interest_rate]=12.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=234.72&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1986&calc[][date_paid]=12%2F31%2F1986&calc[][interest_rate]=9.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=185.82&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1987&calc[][date_paid]=12%2F31%2F1987&calc[][interest_rate]=7.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=146.7&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1988&calc[][date_paid]=12%2F31%2F1988&calc[][interest_rate]=6.0&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=117.68&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1989&calc[][date_paid]=12%2F31%2F1989&calc[][interest_rate]=7.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=136.92&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1990&calc[][date_paid]=12%2F31%2F1990&calc[][interest_rate]=8.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=156.48&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1991&calc[][date_paid]=12%2F31%2F1991&calc[][interest_rate]=8.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=166.26&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1992&calc[][date_paid]=12%2F31%2F1992&calc[][interest_rate]=7.5&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=147.1&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1993&calc[][date_paid]=12%2F31%2F1993&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=107.58&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1994&calc[][date_paid]=12%2F31%2F1994&calc[][interest_rate]=3.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=68.46&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1995&calc[][date_paid]=12%2F31%2F1995&calc[][interest_rate]=3.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=68.46&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1996&calc[][date_paid]=12%2F31%2F1996&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=107.87&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1997&calc[][date_paid]=12%2F31%2F1997&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=107.58&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1998&calc[][date_paid]=12%2F31%2F1998&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=107.58&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F1999&calc[][date_paid]=12%2F31%2F1999&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=107.58&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2000&calc[][date_paid]=12%2F31%2F2000&calc[][interest_rate]=5.0&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=98.07&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2001&calc[][date_paid]=12%2F31%2F2001&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=107.58&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2002&calc[][date_paid]=12%2F31%2F2002&calc[][interest_rate]=6.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=117.36&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2003&calc[][date_paid]=12%2F31%2F2003&calc[][interest_rate]=3.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=58.68&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2004&calc[][date_paid]=12%2F31%2F2004&calc[][interest_rate]=2.0&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=39.23&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2005&calc[][date_paid]=12%2F31%2F2005&calc[][interest_rate]=1.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=19.56&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2006&calc[][date_paid]=12%2F31%2F2006&calc[][interest_rate]=2.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=39.12&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2007&calc[][date_paid]=12%2F31%2F2007&calc[][interest_rate]=4.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=78.24&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2008&calc[][date_paid]=12%2F31%2F2008&calc[][interest_rate]=5.5&calc[][principal]=1955.96&calc[][tf]=1.0027397260274&calc[][total_interest]=107.87&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2009&calc[][date_paid]=12%2F31%2F2009&calc[][interest_rate]=4.0&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=78.24&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2010&calc[][date_paid]=12%2F31%2F2010&calc[][interest_rate]=1.5&calc[][principal]=1955.96&calc[][tf]=1.0&calc[][total_interest]=29.34&calc[][amount_paid]=0.0&calc[][date_awarded]=1%2F1%2F2011&calc[][date_paid]=02%2F09%2F2011&calc[][interest_rate]=0.5&calc[][principal]=1955.96&calc[][tf]=0.10958904109589&calc[][total_interest]=1.07" accept-charset="UTF-8"><div style="margin: 0pt; padding: 0pt; display: inline;"><input type="hidden" value="✓" name="utf8"><input type="hidden" value="dbxrVZT2J42AB0QdMFi2XPggVGAQKtm8IkcuIj+U2jU=" name="authenticity_token"></div>
In all other browsers, this passes with no problem at all. But IE will not tolerate this past a certain point.
Does anyone know how I can pass the same amount of data in a small and condensed way or even in an alternative means?
An alternative, I was thinking, could be passing an alias of the object so that the object itself is passed between controllers, but not through the views. This being done without ever saving the object to the database. Just thinking out loud here.
Open to any ideas. :D
My Haml:
= form_tag generate_csv_path(:calc => @calc.results, :total_interest => @calc.total_interest, :per_diem => @calc.per_diem, :docket_num => @calc.docket_num, :our_file_num => @calc.our_file_num) do
= submit_tag 'Print CSV', :id => "print_csv"
UPDATE
So I'm looping through all the items trying to break them up into smaller hidden fields and they're all coming out as hashes
- @calc.results.each do |k, v|
= hidden_field :calc_result, "#{k[:total_interest]}"
Produces:
"117.68"=>"",
"166.26"=>"",
"147.1"=>"",
"107.58"=>"",
"58.68"=>"",
So unbelievable strange.. I thought I might be able to create a value as a hash eventually. So that 1 calc_result could ahve 5 different attributes in it.
Post the data as < form > body, not as part of the URL.
URLs have length-limit. Data POSTed as form body have no limit as such, since they are part of the header (not URL)
http://support.microsoft.com/kb/208427
UPDATE (in response to your comment) Data as part of form body...
<form method="post" action="/generate_csv.csv">
<input type="hidden" name="calc[][amount_paid]" value="0.0"/>
... //other fields here
</form>
精彩评论