thin-fun_embed 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/lib/thin/fun_embed.rb +12 -0
- data/lib/thin/fun_embed/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4368bba84132f9a940aa8541e80e3cca346b356d
|
4
|
+
data.tar.gz: a236e5126f712e0f1b2efe61fde90b9109aa0aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9727be755c9e99aa3afb699261d30a4393509d58b213a40650e804ac5f4d0b8eafc4ca0a454739afa3d6fc2b62cb27a44c3bda000d5a5d3a00d4f714203be90f
|
7
|
+
data.tar.gz: fa540d9aae9f7f0eddc6303edc0e1eccbbd7891ed72b39924a57fa1326f2862605061270308ae155090437e7e58d6b3827e650af5d59fec23594d48da440743f
|
data/lib/thin/fun_embed.rb
CHANGED
@@ -149,6 +149,18 @@ module Thin # :nodoc:
|
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
152
|
+
if content_length.nil?
|
153
|
+
if String === body
|
154
|
+
content_length = body.bytesize
|
155
|
+
elsif Array === body && body.all?{|b| String === body}
|
156
|
+
content_length = 0
|
157
|
+
body.each{|s| content_length += s.bytesize}
|
158
|
+
end
|
159
|
+
unless content_length.nil?
|
160
|
+
out << "Content-Length: #{content_length}\r\n"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
152
164
|
try_keep_alive &&= @keep_alive && content_length && (!connection || connection == KEEP_ALIVE)
|
153
165
|
out << FULL_KEEP_ALIVE if try_keep_alive && !connection
|
154
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin-fun_embed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sokolov Yura 'funny-falcon'
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thin
|
@@ -65,9 +65,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.4.
|
68
|
+
rubygems_version: 2.4.4
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Subclass of EM::Connection which uses thin internals to do http request handling.
|
72
72
|
It is intentionally not Rack server, but could be used to build some.
|
73
73
|
test_files: []
|
74
|
+
has_rdoc:
|