Skip to content

Commit

Permalink
Fixed the JS minification encoding issue in production..probably
Browse files Browse the repository at this point in the history
  • Loading branch information
kgrz committed Feb 4, 2013
1 parent 5bf82bc commit 4810b71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/.rvmrc
/.sass-cache
/doc/
/.rbenv-version
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -31,7 +31,7 @@ GEM
metaclass (~> 0.0.1)
multi_json (1.5.0)
open4 (1.3.0)
rack (1.5.0)
rack (1.5.1)
rack-protection (1.3.2)
rack
rack-test (0.6.2)
Expand Down
3 changes: 1 addition & 2 deletions lib/sinatra/assetpack/package.rb
Expand Up @@ -97,8 +97,7 @@ def combined
paths.map { |path|
result = session.get(path)
if result.body.respond_to?(:force_encoding)
response_encoding = result.content_type.split(/;\s*charset\s*=\s*/).last.upcase rescue 'ASCII-8BIT'
result.body.force_encoding(response_encoding).encode(Encoding.default_external || 'ASCII-8BIT') if result.status == 200
result.body.force_encoding("ISO-8859-1").encode("UTF-8") if result.status == 200
else
result.body if result.status == 200
end
Expand Down

0 comments on commit 4810b71

Please sign in to comment.