Skip to content

Commit

Permalink
Read asset content in binary mode to suppress CRLF conversion on Wind…
Browse files Browse the repository at this point in the history
…ows (#222)
  • Loading branch information
thloe2 authored Nov 28, 2024
1 parent 6e80584 commit b6dab44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/propshaft/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def initialize(path, logical_path:, load_path:)
end

def content(encoding: "ASCII-8BIT")
File.read(path, encoding: encoding)
File.read(path, encoding: encoding, mode: "rb")
end

def content_type
Expand Down

0 comments on commit b6dab44

Please sign in to comment.