Skip to content
Browse files

support the unnormalized header names from Rails before 2.1

Signed-off-by: ActionRails <opensource@actionrails.com>
  • Loading branch information...
1 parent 92a1954 commit 361dda5c12add180d3d74baf1487caf0f99f5645 togren committed with Jul 29, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/mod_porter.rb
View
5 lib/mod_porter.rb
@@ -39,9 +39,10 @@ def self.included(base)
end
def normalize_mod_porters
- return if request.headers["X-Uploads"].blank?
+ x_uploads_header = request.headers["X-Uploads"] || request.headers["HTTP_X_UPLOADS"]
+ return if x_uploads_header.blank?
- porter_params = request.headers["X-Uploads"].split(",").uniq
+ porter_params = x_uploads_header.split(",").uniq
logger.info("Processing #{porter_params.inspect}")
porter_params.each do |file_param|

0 comments on commit 361dda5

Please sign in to comment.
Something went wrong with that request. Please try again.