thin 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a52ecc8925833038f1f9b6ac7b421032e9524d79
4
- data.tar.gz: 5270eac2bbf836f0574704b908c7db468e05d977
3
+ metadata.gz: 59e48abc41d2a88e89281a8902c419f1eecfb5ac
4
+ data.tar.gz: 2a10974b8d31419469cee3940e9a206f8217f4de
5
5
  SHA512:
6
- metadata.gz: 992772f4b87b8086f5a99323cefd7ec748b89148d58f2758c9e911b84f1bc72f5c8181460145f92660ba0def62d2c8fcb4a9d4aca7aa32eae98805ea316ec654
7
- data.tar.gz: 1617c532da78f8a0173e933dee24c03ac521cdbd41ef79e83fc2543a993dbccc1bd528638c0fac3668996cc1939c9e233f75f5fda78240460333cdabb23be2b1
6
+ metadata.gz: 19c24955dc648213173e227df391a325c4de88b48d59c37929977b5524e9cdc834717430cfb6b294fa9d0b59f4205776a2918a64db4f3985fe5d5c6ea0b62708
7
+ data.tar.gz: 98e01afb757f4e7258b73799bee4a83daf05786edf771025da785b354d12be70444aae73f222d9c19859f9574e1a4002b3fbea934e178b841a5dbb8fbd08a8fa
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ == 1.6.4 Gob Bluth
2
+ * Increase REQUEST_PATH to 2048 symbols [X2rdas]
3
+ * Fix warning in logger [tenderlove]
4
+ * Add :timeout option for Rack::Server.new [sugitak]
5
+ * When restarting, exit on a next tick so we can send response back to a client [rsamoilov]
6
+ * Check for empty PID files [z1dane]
7
+ * Update Event Machine version to 1.0.4, Ruby 2.2.0 fix [freemanoid]
8
+
9
+
1
10
  == 1.6.3 Protein Powder
2
11
  * Add HTTP 422 status code [rajcybage]
3
12
  * Add warning about EM reactor still running when stopping.
@@ -67,7 +67,7 @@ DEF_MAX_LENGTH(FIELD_NAME, 256);
67
67
  DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024);
68
68
  DEF_MAX_LENGTH(REQUEST_URI, 1024 * 12);
69
69
  DEF_MAX_LENGTH(FRAGMENT, 1024); /* Don't know if this length is specified somewhere or not */
70
- DEF_MAX_LENGTH(REQUEST_PATH, 1024);
70
+ DEF_MAX_LENGTH(REQUEST_PATH, 2048);
71
71
  DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
72
72
  DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32)));
73
73
 
@@ -3,7 +3,7 @@ module Thin
3
3
  # A Backend connects the server to the client. It handles:
4
4
  # * connection/disconnection to the server
5
5
  # * initialization of the connections
6
- # * manitoring of the active connections.
6
+ # * monitoring of the active connections.
7
7
  #
8
8
  # == Implementing your own backend
9
9
  # You can create your own minimal backend by inheriting this class and
@@ -61,6 +61,7 @@ module Thin
61
61
  private
62
62
  def run(command)
63
63
  Dir[config_path + '/*'].each do |config|
64
+ next if config.end_with?("~")
64
65
  log_info "[#{command}] #{config} ..."
65
66
  Command.run(command, :config => config, :daemonize => true)
66
67
  end
@@ -32,7 +32,7 @@ module Thin
32
32
  end
33
33
 
34
34
  def pid
35
- File.exist?(pid_file) ? open(pid_file).read.to_i : nil
35
+ File.exist?(pid_file) && !File.zero?(pid_file) ? open(pid_file).read.to_i : nil
36
36
  end
37
37
 
38
38
  # Turns the current script into a daemon process that detaches from the console.
@@ -95,7 +95,7 @@ module Thin
95
95
  stop
96
96
  remove_pid_file
97
97
  @on_restart.call
98
- exit!
98
+ EM.next_tick { exit! }
99
99
  end
100
100
  end
101
101
 
@@ -17,6 +17,8 @@ module Thin
17
17
  end
18
18
  end
19
19
 
20
+ @trace_logger = nil
21
+
20
22
  class << self
21
23
  attr_reader :logger
22
24
  attr_reader :trace_logger
@@ -152,7 +154,10 @@ module Thin
152
154
 
153
155
  # Log a message at ERROR level (and maybe a backtrace)
154
156
  def log_error(msg, e=nil)
155
- log_msg = msg + ": #{e}\n\t" + e.backtrace.join("\n\t") + "\n" if e
157
+ log_msg = msg
158
+ if e
159
+ log_msg += ": #{e}\n\t" + e.backtrace.join("\n\t") + "\n"
160
+ end
156
161
  Logging.log_msg(log_msg, Logger::ERROR)
157
162
  end
158
163
  module_function :log_error
@@ -15,7 +15,7 @@ module Thin
15
15
 
16
16
  INITIAL_BODY = ''
17
17
  # Force external_encoding of request's body to ASCII_8BIT
18
- INITIAL_BODY.encode!(Encoding::ASCII_8BIT) if INITIAL_BODY.respond_to?(:encode!)
18
+ INITIAL_BODY.encode!(Encoding::ASCII_8BIT) if INITIAL_BODY.respond_to?(:encode!) && defined?(Encoding::ASCII_8BIT)
19
19
 
20
20
  # Freeze some HTTP header names & values
21
21
  SERVER_SOFTWARE = 'SERVER_SOFTWARE'.freeze
@@ -125,7 +125,7 @@ module Thin
125
125
  # Set defaults
126
126
  @backend.maximum_connections = DEFAULT_MAXIMUM_CONNECTIONS
127
127
  @backend.maximum_persistent_connections = DEFAULT_MAXIMUM_PERSISTENT_CONNECTIONS
128
- @backend.timeout = DEFAULT_TIMEOUT
128
+ @backend.timeout = options[:timeout] || DEFAULT_TIMEOUT
129
129
 
130
130
  # Allow using Rack builder as a block
131
131
  @app = Rack::Builder.new(&block).to_app if block
@@ -6,11 +6,11 @@ module Thin
6
6
  module VERSION #:nodoc:
7
7
  MAJOR = 1
8
8
  MINOR = 6
9
- TINY = 3
9
+ TINY = 4
10
10
 
11
11
  STRING = [MAJOR, MINOR, TINY].join('.')
12
12
 
13
- CODENAME = "Protein Powder".freeze
13
+ CODENAME = "Gob Bluth".freeze
14
14
 
15
15
  RACK = [1, 0].freeze # Rack protocol version
16
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-Andre Cournoyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-02 00:00:00.000000000 Z
11
+ date: 2015-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.0.4
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +41,9 @@ dependencies:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
43
  version: '1.0'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.0.4
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: daemons
43
49
  requirement: !ruby/object:Gem::Requirement