boourns-unicorn 4.4.8 → 4.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/unicorn_http/unicorn_http.rl +2 -2
- data/lib/unicorn/configurator.rb +2 -13
- data/lib/unicorn/http_server.rb +7 -1
- data/unicorn.gemspec +1 -2
- metadata +13 -12
@@ -626,7 +626,7 @@ static VALUE HttpParser_clear(VALUE self)
|
|
626
626
|
|
627
627
|
http_parser_init(hp);
|
628
628
|
rb_funcall(hp->env, id_clear, 0);
|
629
|
-
|
629
|
+
rb_funcall(self, id_response_start_sent, 1, Qfalse);
|
630
630
|
|
631
631
|
return self;
|
632
632
|
}
|
@@ -1032,7 +1032,7 @@ void Init_unicorn_http(void)
|
|
1032
1032
|
SET_GLOBAL(g_http_connection, "CONNECTION");
|
1033
1033
|
id_clear = rb_intern("clear");
|
1034
1034
|
id_set_backtrace = rb_intern("set_backtrace");
|
1035
|
-
id_response_start_sent = rb_intern("
|
1035
|
+
id_response_start_sent = rb_intern("response_start_sent=");
|
1036
1036
|
init_unicorn_httpdate();
|
1037
1037
|
}
|
1038
1038
|
#undef SET_GLOBAL
|
data/lib/unicorn/configurator.rb
CHANGED
@@ -99,13 +99,8 @@ class Unicorn::Configurator
|
|
99
99
|
end
|
100
100
|
if set[:check_client_connection]
|
101
101
|
set[:listeners].each do |address|
|
102
|
-
if set[:listener_opts][address][:tcp_nopush] == true
|
103
|
-
raise ArgumentError,
|
104
|
-
"check_client_connection is incompatible with tcp_nopush:true"
|
105
|
-
end
|
106
|
-
if set[:listener_opts][address][:tcp_nodelay] == true
|
107
|
-
raise ArgumentError,
|
108
|
-
"check_client_connection is incompatible with tcp_nodelay:true"
|
102
|
+
if set[:listener_opts][address][:tcp_nopush] == true || set[:listener_opts][address][:tcp_nodelay] == true
|
103
|
+
raise ArgumentError, "With check_client_connection set to true both :tcp_nopush and :tcp_nodelay listener options must be set to false."
|
109
104
|
end
|
110
105
|
end
|
111
106
|
end
|
@@ -469,12 +464,6 @@ class Unicorn::Configurator
|
|
469
464
|
|
470
465
|
# When enabled, unicorn will check the client connection by writing
|
471
466
|
# the beginning of the HTTP headers before calling the application.
|
472
|
-
#
|
473
|
-
# This will prevent calling the application for clients who have
|
474
|
-
# disconnected while their connection was queued.
|
475
|
-
#
|
476
|
-
# This option cannot be used in conjunction with tcp_nodelay or
|
477
|
-
# tcp_nopush.
|
478
467
|
def check_client_connection(bool)
|
479
468
|
set_bool(:check_client_connection, bool)
|
480
469
|
end
|
data/lib/unicorn/http_server.rb
CHANGED
@@ -558,7 +558,13 @@ class Unicorn::HttpServer
|
|
558
558
|
status, headers, body = @app.call(env)
|
559
559
|
end
|
560
560
|
@request.headers? or headers = nil
|
561
|
-
|
561
|
+
|
562
|
+
if body.nil?
|
563
|
+
@logger.error("Rendered a nil body status #{status} headers #{headers} env #{env}")
|
564
|
+
client.respond_to?(:close) and body.close
|
565
|
+
else
|
566
|
+
http_response_write(client, status, headers, body, @request.response_start_sent)
|
567
|
+
end
|
562
568
|
client.shutdown # in case of fork() in Rack app
|
563
569
|
client.close # flush and uncork socket immediately, no keepalive
|
564
570
|
rescue => e
|
data/unicorn.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
|
-
ENV["VERSION"] or abort "VERSION= must be specified"
|
3
2
|
manifest = File.readlines('.manifest').map! { |x| x.chomp! }
|
4
3
|
require 'wrongdoc'
|
5
4
|
extend Wrongdoc::Gemspec
|
@@ -14,7 +13,7 @@ end.compact
|
|
14
13
|
|
15
14
|
Gem::Specification.new do |s|
|
16
15
|
s.name = %q{boourns-unicorn}
|
17
|
-
s.version = "4.4.
|
16
|
+
s.version = "4.4.9"
|
18
17
|
s.authors = ["#{name} hackers"]
|
19
18
|
s.summary = summary
|
20
19
|
s.date = Time.now.utc.strftime('%Y-%m-%d')
|
metadata
CHANGED
@@ -3,7 +3,7 @@ name: !binary |-
|
|
3
3
|
Ym9vdXJucy11bmljb3Ju
|
4
4
|
version: !ruby/object:Gem::Version
|
5
5
|
version: !binary |-
|
6
|
-
|
6
|
+
NC40Ljk=
|
7
7
|
prerelease:
|
8
8
|
platform: ruby
|
9
9
|
authors:
|
@@ -11,12 +11,12 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2013-02-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: !binary |-
|
18
18
|
cmFjaw==
|
19
|
-
requirement: &
|
19
|
+
requirement: &70149000442480 !ruby/object:Gem::Requirement
|
20
20
|
none: false
|
21
21
|
requirements:
|
22
22
|
- - ! '>='
|
@@ -24,11 +24,11 @@ dependencies:
|
|
24
24
|
version: '0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *70149000442480
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: !binary |-
|
30
30
|
a2dpbw==
|
31
|
-
requirement: &
|
31
|
+
requirement: &70149000441740 !ruby/object:Gem::Requirement
|
32
32
|
none: false
|
33
33
|
requirements:
|
34
34
|
- - !binary |-
|
@@ -38,11 +38,11 @@ dependencies:
|
|
38
38
|
Mi42
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
|
-
version_requirements: *
|
41
|
+
version_requirements: *70149000441740
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: !binary |-
|
44
44
|
cmFpbmRyb3Bz
|
45
|
-
requirement: &
|
45
|
+
requirement: &70149000441220 !ruby/object:Gem::Requirement
|
46
46
|
none: false
|
47
47
|
requirements:
|
48
48
|
- - !binary |-
|
@@ -52,11 +52,11 @@ dependencies:
|
|
52
52
|
MC43
|
53
53
|
type: :runtime
|
54
54
|
prerelease: false
|
55
|
-
version_requirements: *
|
55
|
+
version_requirements: *70149000441220
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: !binary |-
|
58
58
|
aXNvbGF0ZQ==
|
59
|
-
requirement: &
|
59
|
+
requirement: &70149000440740 !ruby/object:Gem::Requirement
|
60
60
|
none: false
|
61
61
|
requirements:
|
62
62
|
- - !binary |-
|
@@ -66,11 +66,11 @@ dependencies:
|
|
66
66
|
My4y
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70149000440740
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: !binary |-
|
72
72
|
d3Jvbmdkb2M=
|
73
|
-
requirement: &
|
73
|
+
requirement: &70149000440260 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - !binary |-
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
MS42LjE=
|
81
81
|
type: :development
|
82
82
|
prerelease: false
|
83
|
-
version_requirements: *
|
83
|
+
version_requirements: *70149000440260
|
84
84
|
description: ! '\Unicorn is an HTTP server for Rack applications designed to only
|
85
85
|
serve
|
86
86
|
|
@@ -331,3 +331,4 @@ test_files:
|
|
331
331
|
- test/unit/test_server.rb
|
332
332
|
- test/unit/test_sni_hostnames.rb
|
333
333
|
- test/unit/test_util.rb
|
334
|
+
has_rdoc:
|