From cfdd74436ecf6f4f18aaa560ee53d5d92eff77fe Mon Sep 17 00:00:00 2001 From: Mathias Lafeldt Date: Thu, 5 Feb 2015 11:48:58 +0100 Subject: [PATCH] Sort fastcgi params to have stable ordering The hash sorting was started in #532 and this fixes it for fastcgi as well. --- templates/vhost/locations/fastcgi.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/vhost/locations/fastcgi.erb b/templates/vhost/locations/fastcgi.erb index 2dacdf0cf..cb3937c41 100644 --- a/templates/vhost/locations/fastcgi.erb +++ b/templates/vhost/locations/fastcgi.erb @@ -16,7 +16,7 @@ <% end -%> <% if defined? @fastcgi_param -%> <%- field_width = @fastcgi_param.inject(0) { |l,(k,v)| k.size > l ? k.size : l } -%> - <%- @fastcgi_param.each do |key, val| -%> + <%- @fastcgi_param.sort_by {|k,v| k}.each do |key, val| -%> fastcgi_param <%= sprintf("%-*s", field_width, key) %> <%= val %>; <%- end -%> <% end -%>