about summary refs log tree commit homepage
path: root/test/unit
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-08 15:10:04 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-08 16:02:13 -0700
commit84081b4508c51d04a4a9019fcffe0e034b0b2d39 (patch)
tree3b53874b79b0a897ac7924a245d8939859d2f565 /test/unit
parente9b8313d80c9ca870a25f7047454c98b81dd7c85 (diff)
downloadunicorn-84081b4508c51d04a4a9019fcffe0e034b0b2d39.tar.gz
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.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/test_configurator.rb2
-rw-r--r--test/unit/test_http_parser.rb2
-rw-r--r--test/unit/test_http_parser_ng.rb2
-rw-r--r--test/unit/test_request.rb2
-rw-r--r--test/unit/test_response.rb2
-rw-r--r--test/unit/test_server.rb2
-rw-r--r--test/unit/test_signals.rb2
-rw-r--r--test/unit/test_socket_helper.rb2
-rw-r--r--test/unit/test_tee_input.rb3
-rw-r--r--test/unit/test_upload.rb2
-rw-r--r--test/unit/test_util.rb2
11 files changed, 22 insertions, 1 deletions
diff --git a/test/unit/test_configurator.rb b/test/unit/test_configurator.rb
index aa29f61..9e18728 100644
--- a/test/unit/test_configurator.rb
+++ b/test/unit/test_configurator.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 require 'test/unit'
 require 'tempfile'
 require 'unicorn'
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 7475de5..1b3faaf 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2005 Zed A. Shaw
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
diff --git a/test/unit/test_http_parser_ng.rb b/test/unit/test_http_parser_ng.rb
index 6b9c89d..397b0b0 100644
--- a/test/unit/test_http_parser_ng.rb
+++ b/test/unit/test_http_parser_ng.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # coding: binary
 require 'test/test_helper'
 require 'digest/md5'
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb
index 6e648c2..1896300 100644
--- a/test/unit/test_request.rb
+++ b/test/unit/test_request.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2009 Eric Wong
 # You can redistribute it and/or modify it under the same terms as Ruby.
 
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb
index 0c4d29e..f9eda8e 100644
--- a/test/unit/test_response.rb
+++ b/test/unit/test_response.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2005 Zed A. Shaw
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
diff --git a/test/unit/test_server.rb b/test/unit/test_server.rb
index fff7f89..bbb06da 100644
--- a/test/unit/test_server.rb
+++ b/test/unit/test_server.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2005 Zed A. Shaw
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
diff --git a/test/unit/test_signals.rb b/test/unit/test_signals.rb
index f4b5f89..9e8ccd0 100644
--- a/test/unit/test_signals.rb
+++ b/test/unit/test_signals.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2009 Eric Wong
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb
index 75d9f7b..dbca69b 100644
--- a/test/unit/test_socket_helper.rb
+++ b/test/unit/test_socket_helper.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 require 'test/test_helper'
 require 'tempfile'
 
diff --git a/test/unit/test_tee_input.rb b/test/unit/test_tee_input.rb
index 0594d6d..a4dffaf 100644
--- a/test/unit/test_tee_input.rb
+++ b/test/unit/test_tee_input.rb
@@ -1,4 +1,5 @@
-# encoding: binary
+# -*- encoding: binary -*-
+
 require 'test/unit'
 require 'digest/sha1'
 require 'unicorn'
diff --git a/test/unit/test_upload.rb b/test/unit/test_upload.rb
index a34b52b..7ac3c9e 100644
--- a/test/unit/test_upload.rb
+++ b/test/unit/test_upload.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 # Copyright (c) 2009 Eric Wong
 require 'test/test_helper'
 require 'digest/md5'
diff --git a/test/unit/test_util.rb b/test/unit/test_util.rb
index 99c1cef..4a1e21f 100644
--- a/test/unit/test_util.rb
+++ b/test/unit/test_util.rb
@@ -1,3 +1,5 @@
+# -*- encoding: binary -*-
+
 require 'test/test_helper'
 require 'tempfile'