unicorn 4.5.0pre1 → 4.5.0

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/GIT-VERSION-GEN CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v4.5.0pre1
4
+ DEF_VER=v4.5.0
5
5
 
6
6
  LF='
7
7
  '
data/README CHANGED
@@ -60,11 +60,11 @@ both the the request and response in between \Unicorn and slow clients.
60
60
  == License
61
61
 
62
62
  \Unicorn is copyright 2009 by all contributors (see logs in git).
63
- It is based on Mongrel 1.1.5 and carries the same license.
63
+ It is based on Mongrel 1.1.5.
64
+ Mongrel is copyright 2007 Zed A. Shaw and contributors.
64
65
 
65
- Mongrel is copyright 2007 Zed A. Shaw and contributors. It is
66
- tri-licensed under (your choice) of the GPLv3, GPLv2 or Ruby-specific
67
- terms. See the included LICENSE file for details.
66
+ \Unicorn is tri-licensed under (your choice) of the GPLv3, GPLv2 or
67
+ Ruby (1.8)-specific terms. See the included LICENSE file for details.
68
68
 
69
69
  \Unicorn is 100% Free Software.
70
70
 
data/lib/unicorn/const.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  # improve things much compared to constants.
9
9
  module Unicorn::Const
10
10
 
11
- UNICORN_VERSION = "4.5.0pre1"
11
+ UNICORN_VERSION = "4.5.0"
12
12
 
13
13
  # default TCP listen host address (0.0.0.0, all interfaces)
14
14
  DEFAULT_HOST = "0.0.0.0"
@@ -29,10 +29,12 @@ module Unicorn::Const
29
29
 
30
30
  # :stopdoc:
31
31
  # common errors we'll send back
32
- ERROR_400_RESPONSE = "400 Bad Request\r\n\r\n"
33
- ERROR_414_RESPONSE = "414 Request-URI Too Long\r\n\r\n"
34
- ERROR_413_RESPONSE = "413 Request Entity Too Large\r\n\r\n"
35
- ERROR_500_RESPONSE = "500 Internal Server Error\r\n\r\n"
32
+ # (N.B. these are not used by unicorn, but we won't drop them until
33
+ # unicorn 5.x to avoid breaking Rainbows!).
34
+ ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n"
35
+ ERROR_414_RESPONSE = "HTTP/1.1 414 Request-URI Too Long\r\n\r\n"
36
+ ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n"
37
+ ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n"
36
38
 
37
39
  EXPECT_100_RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n"
38
40
  EXPECT_100_RESPONSE_SUFFIXED = "100 Continue\r\n\r\nHTTP/1.1 "
@@ -17,6 +17,10 @@ module Unicorn::HttpResponse
17
17
  }
18
18
  CRLF = "\r\n"
19
19
 
20
+ def err_response(code, response_start_sent)
21
+ "#{response_start_sent ? '' : 'HTTP/1.1 '}#{CODES[code]}\r\n\r\n"
22
+ end
23
+
20
24
  # writes the rack_response to socket as an HTTP response
21
25
  def http_response_write(socket, status, headers, body,
22
26
  response_start_sent=false)
@@ -519,22 +519,21 @@ class Unicorn::HttpServer
519
519
  # if the socket is already closed or broken. We'll always ensure
520
520
  # the socket is closed at the end of this function
521
521
  def handle_error(client, e)
522
- msg = case e
522
+ code = case e
523
523
  when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,Errno::EBADF,
524
524
  Errno::ENOTCONN
525
- Unicorn::Const::ERROR_500_RESPONSE
525
+ 500
526
526
  when Unicorn::RequestURITooLongError
527
- Unicorn::Const::ERROR_414_RESPONSE
527
+ 414
528
528
  when Unicorn::RequestEntityTooLargeError
529
- Unicorn::Const::ERROR_413_RESPONSE
529
+ 413
530
530
  when Unicorn::HttpParserError # try to tell the client they're bad
531
- Unicorn::Const::ERROR_400_RESPONSE
531
+ 400
532
532
  else
533
533
  Unicorn.log_error(@logger, "app error", e)
534
- Unicorn::Const::ERROR_500_RESPONSE
534
+ 500
535
535
  end
536
- msg = "HTTP/1.1 #{msg}" unless @request.response_start_sent
537
- client.kgio_trywrite(msg)
536
+ client.kgio_trywrite(err_response(code, @request.response_start_sent))
538
537
  client.close
539
538
  rescue
540
539
  end
data/unicorn.gemspec CHANGED
@@ -40,5 +40,5 @@ Gem::Specification.new do |s|
40
40
  s.add_development_dependency('isolate', '~> 3.2')
41
41
  s.add_development_dependency('wrongdoc', '~> 1.6.1')
42
42
 
43
- # s.licenses = %w(GPLv2 Ruby) # licenses= method is not in older RubyGems
43
+ s.licenses = ["GPLv2", "GPLv3", "Ruby 1.8"]
44
44
  end
metadata CHANGED
@@ -1,112 +1,139 @@
1
- --- !ruby/object:Gem::Specification
2
- name: unicorn
3
- version: !ruby/object:Gem::Version
4
- hash: -223651717
5
- prerelease: 5
6
- segments:
7
- - 4
8
- - 5
9
- - 0
10
- - pre
11
- - 1
12
- version: 4.5.0pre1
1
+ --- !ruby/object:Gem::Specification
2
+ name: !binary |-
3
+ dW5pY29ybg==
4
+ version: !ruby/object:Gem::Version
5
+ version: 4.5.0
6
+ prerelease:
13
7
  platform: ruby
14
- authors:
8
+ authors:
15
9
  - Unicorn hackers
16
10
  autorequire:
17
11
  bindir: bin
18
12
  cert_chain: []
19
-
20
- date: 2012-11-29 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: rack
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
13
+ date: 2012-12-08 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: !binary |-
17
+ cmFjaw==
18
+ requirement: !ruby/object:Gem::Requirement
26
19
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: '0'
34
24
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: kgio
38
25
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: !ruby/object:Gem::Requirement
40
27
  none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 15
45
- segments:
46
- - 2
47
- - 6
48
- version: "2.6"
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ - !ruby/object:Gem::Dependency
33
+ name: !binary |-
34
+ a2dpbw==
35
+ requirement: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - !binary |-
39
+ fj4=
40
+ - !ruby/object:Gem::Version
41
+ version: !binary |-
42
+ Mi42
49
43
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: raindrops
53
44
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - !binary |-
49
+ fj4=
50
+ - !ruby/object:Gem::Version
51
+ version: !binary |-
52
+ Mi42
53
+ - !ruby/object:Gem::Dependency
54
+ name: !binary |-
55
+ cmFpbmRyb3Bz
56
+ requirement: !ruby/object:Gem::Requirement
55
57
  none: false
56
- requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 5
60
- segments:
61
- - 0
62
- - 7
63
- version: "0.7"
58
+ requirements:
59
+ - - !binary |-
60
+ fj4=
61
+ - !ruby/object:Gem::Version
62
+ version: !binary |-
63
+ MC43
64
64
  type: :runtime
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: isolate
68
65
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
66
+ version_requirements: !ruby/object:Gem::Requirement
70
67
  none: false
71
- requirements:
72
- - - ~>
73
- - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
76
- - 3
77
- - 2
78
- version: "3.2"
68
+ requirements:
69
+ - - !binary |-
70
+ fj4=
71
+ - !ruby/object:Gem::Version
72
+ version: !binary |-
73
+ MC43
74
+ - !ruby/object:Gem::Dependency
75
+ name: !binary |-
76
+ aXNvbGF0ZQ==
77
+ requirement: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - !binary |-
81
+ fj4=
82
+ - !ruby/object:Gem::Version
83
+ version: !binary |-
84
+ My4y
79
85
  type: :development
80
- version_requirements: *id004
81
- - !ruby/object:Gem::Dependency
82
- name: wrongdoc
83
86
  prerelease: false
84
- requirement: &id005 !ruby/object:Gem::Requirement
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - !binary |-
91
+ fj4=
92
+ - !ruby/object:Gem::Version
93
+ version: !binary |-
94
+ My4y
95
+ - !ruby/object:Gem::Dependency
96
+ name: !binary |-
97
+ d3Jvbmdkb2M=
98
+ requirement: !ruby/object:Gem::Requirement
85
99
  none: false
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- hash: 13
90
- segments:
91
- - 1
92
- - 6
93
- - 1
94
- version: 1.6.1
100
+ requirements:
101
+ - - !binary |-
102
+ fj4=
103
+ - !ruby/object:Gem::Version
104
+ version: !binary |-
105
+ MS42LjE=
95
106
  type: :development
96
- version_requirements: *id005
97
- description: |-
98
- \Unicorn is an HTTP server for Rack applications designed to only serve
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - !binary |-
112
+ fj4=
113
+ - !ruby/object:Gem::Version
114
+ version: !binary |-
115
+ MS42LjE=
116
+ description: ! '\Unicorn is an HTTP server for Rack applications designed to only
117
+ serve
118
+
99
119
  fast clients on low-latency, high-bandwidth connections and take
120
+
100
121
  advantage of features in Unix/Unix-like kernels. Slow clients should
122
+
101
123
  only be served by placing a reverse proxy capable of fully buffering
102
- both the the request and response in between \Unicorn and slow clients.
103
- email: mongrel-unicorn@rubyforge.org
104
- executables:
105
- - unicorn
106
- - unicorn_rails
107
- extensions:
108
- - ext/unicorn_http/extconf.rb
109
- extra_rdoc_files:
124
+
125
+ both the the request and response in between \Unicorn and slow clients.'
126
+ email: !binary |-
127
+ bW9uZ3JlbC11bmljb3JuQHJ1Ynlmb3JnZS5vcmc=
128
+ executables:
129
+ - !binary |-
130
+ dW5pY29ybg==
131
+ - !binary |-
132
+ dW5pY29ybl9yYWlscw==
133
+ extensions:
134
+ - !binary |-
135
+ ZXh0L3VuaWNvcm5faHR0cC9leHRjb25mLnJi
136
+ extra_rdoc_files:
110
137
  - FAQ
111
138
  - README
112
139
  - TUNING
@@ -134,7 +161,7 @@ extra_rdoc_files:
134
161
  - Sandbox
135
162
  - Links
136
163
  - Application_Timeouts
137
- files:
164
+ files:
138
165
  - .CHANGELOG.old
139
166
  - .document
140
167
  - .gitignore
@@ -298,44 +325,41 @@ files:
298
325
  - test/unit/test_util.rb
299
326
  - unicorn.gemspec
300
327
  homepage: http://unicorn.bogomips.org/
301
- licenses: []
302
-
328
+ licenses:
329
+ - !binary |-
330
+ R1BMdjI=
331
+ - !binary |-
332
+ R1BMdjM=
333
+ - !binary |-
334
+ UnVieSAxLjg=
303
335
  post_install_message:
304
- rdoc_options:
336
+ rdoc_options:
305
337
  - -t
306
- - "Unicorn: Rack HTTP server for fast clients and Unix"
338
+ - ! 'Unicorn: Rack HTTP server for fast clients and Unix'
307
339
  - -W
308
340
  - http://bogomips.org/unicorn.git/tree/%s
309
- require_paths:
341
+ require_paths:
310
342
  - lib
311
- required_ruby_version: !ruby/object:Gem::Requirement
343
+ required_ruby_version: !ruby/object:Gem::Requirement
312
344
  none: false
313
- requirements:
314
- - - ">="
315
- - !ruby/object:Gem::Version
316
- hash: 3
317
- segments:
318
- - 0
319
- version: "0"
320
- required_rubygems_version: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - ! '>='
347
+ - !ruby/object:Gem::Version
348
+ version: '0'
349
+ required_rubygems_version: !ruby/object:Gem::Requirement
321
350
  none: false
322
- requirements:
323
- - - ">"
324
- - !ruby/object:Gem::Version
325
- hash: 25
326
- segments:
327
- - 1
328
- - 3
329
- - 1
330
- version: 1.3.1
351
+ requirements:
352
+ - - ! '>='
353
+ - !ruby/object:Gem::Version
354
+ version: '0'
331
355
  requirements: []
332
-
333
- rubyforge_project: mongrel
334
- rubygems_version: 1.8.24
356
+ rubyforge_project: !binary |-
357
+ bW9uZ3JlbA==
358
+ rubygems_version: 1.8.23
335
359
  signing_key:
336
360
  specification_version: 3
337
361
  summary: Rack HTTP server for fast clients and Unix
338
- test_files:
362
+ test_files:
339
363
  - test/unit/test_configurator.rb
340
364
  - test/unit/test_http_parser.rb
341
365
  - test/unit/test_http_parser_ng.rb