Skip to content

Commit 84081b4

Browse files
author
Eric Wong
committed
"encoding: binary" comments for all sources (1.9)
This ensures any string literals that pop up in *our* code will just be a bag of bytes. This shouldn't affect/fix/break existing apps in most cases, but most constants will always have the "correct" encoding (none!) to be consistent with HTTP/socket expectations. Since this comment affects things only on a per-source basis, it won't affect existing apps with the exception of strings we pass to the Rack application. This will eventually allow us to get rid of that Unicorn::Z constant, too.
1 parent e9b8313 commit 84081b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+147
-2
lines changed

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- encoding: binary -*-
12

23
require 'rubygems'
34
require 'echoe'

bin/unicorn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/home/ew/bin/ruby
2+
# -*- encoding: binary -*-
23
require 'unicorn/launcher'
34
require 'optparse'
45

bin/unicorn_rails

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/home/ew/bin/ruby
2+
# -*- encoding: binary -*-
23
require 'unicorn/launcher'
34
require 'optparse'
45
require 'fileutils'

ext/unicorn_http/extconf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- encoding: binary -*-
12
require 'mkmf'
23

34
dir_config("unicorn_http")

lib/unicorn.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
require 'fcntl'
24
require 'unicorn/socket_helper'
35
autoload :Rack, 'rack'

lib/unicorn/app/exec_cgi.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
require 'unicorn'
24

35
module Unicorn::App

lib/unicorn/app/inetd.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
# Copyright (c) 2009 Eric Wong
24
# You can redistribute it and/or modify it under the same terms as Ruby.
35

lib/unicorn/app/old_rails.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
# This code is based on the original Rails handler in Mongrel
24
# Copyright (c) 2005 Zed A. Shaw
35
# Copyright (c) 2009 Eric Wong

lib/unicorn/app/old_rails/static.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
# This code is based on the original Rails handler in Mongrel
24
# Copyright (c) 2005 Zed A. Shaw
35
# Copyright (c) 2009 Eric Wong

lib/unicorn/cgi_wrapper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- encoding: binary -*-
2+
13
# This code is based on the original CGIWrapper from Mongrel
24
# Copyright (c) 2005 Zed A. Shaw
35
# Copyright (c) 2009 Eric Wong

0 commit comments

Comments
 (0)