From 84081b4508c51d04a4a9019fcffe0e034b0b2d39 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Sep 2009 15:10:04 -0700 Subject: "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. --- test/unit/test_configurator.rb | 2 ++ test/unit/test_http_parser.rb | 2 ++ test/unit/test_http_parser_ng.rb | 2 ++ test/unit/test_request.rb | 2 ++ test/unit/test_response.rb | 2 ++ test/unit/test_server.rb | 2 ++ test/unit/test_signals.rb | 2 ++ test/unit/test_socket_helper.rb | 2 ++ test/unit/test_tee_input.rb | 3 ++- test/unit/test_upload.rb | 2 ++ test/unit/test_util.rb | 2 ++ 11 files changed, 22 insertions(+), 1 deletion(-) (limited to 'test/unit') 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' -- cgit v1.2.3-24-ge0c7