mizuno 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,9 @@ module Mizuno
18
18
  include_class org.eclipse.jetty.continuation.ContinuationSupport
19
19
  include_class org.jruby.rack.servlet.RewindableInputStream
20
20
 
21
+ # Regex for splitting on newlines.
22
+ NEWLINE = /\n/
23
+
21
24
  #
22
25
  # Sets the Rack application that handles requests sent to this
23
26
  # servlet container.
@@ -186,13 +189,16 @@ module Mizuno
186
189
  # Set the HTTP status code.
187
190
  response.setStatus(status.to_i)
188
191
 
189
- # Did we get a Content-Length header?
190
- content_length = headers.delete('Content-Length')
191
- response.setContentLength(content_length.to_i) \
192
- if content_length
192
+ # Servlets require that we set Content-Length and
193
+ # Content-Type differently than other headers.
194
+ content_length = headers.delete('Content-Length') \
195
+ and response.setContentLength(content_length.to_i)
196
+ content_type = headers.delete('Content-Type') \
197
+ and response.setContentType(content_type)
193
198
 
194
199
  # Add all the result headers.
195
- headers.each { |h, v| response.addHeader(h, v) }
200
+ headers.each { |h, v| v.split(NEWLINE).each { |l|
201
+ response.addHeader(h, l) } }
196
202
  end
197
203
 
198
204
  # How else would we write output?
@@ -1,3 +1,3 @@
1
1
  module Mizuno
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
data/mizuno.gemspec CHANGED
@@ -17,20 +17,12 @@ Gem::Specification.new do |spec|
17
17
  LICENSE
18
18
  Rakefile
19
19
  Gemfile
20
- mizuno.gemspec
21
- lib/mizuno/choices.rb
22
- lib/mizuno/http_server.rb
23
- lib/mizuno/java_logger.rb
24
- lib/mizuno/rack/chunked.rb
25
- lib/mizuno/rack_servlet.rb
26
- lib/mizuno/reloader.rb
27
- lib/mizuno/runner.rb
28
- lib/mizuno/version.rb
29
- lib/mizuno.rb
30
- lib/rack/handler/mizuno.rb
31
- bin/mizuno)
32
- jars = Dir.entries("lib/java").grep(/\.jar$/)
33
- spec.files.concat(jars.map { |j| "lib/java/#{j}" })
20
+ mizuno.gemspec)
21
+ spec.files.concat(Dir['lib/**/*.rb'])
22
+ spec.files.concat(Dir['bin/*'])
23
+ spec.files.concat(Dir['lib/**/*.jar'])
24
+ # jars = Dir.entries("lib/java").grep(/\.jar$/)
25
+ # spec.files.concat(jars.map { |j| "lib/java/#{j}" })
34
26
  spec.homepage = 'http://github.com/matadon/mizuno'
35
27
  spec.has_rdoc = false
36
28
  spec.require_paths = [ "lib" ]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mizuno
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.0
5
+ version: 0.6.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Don Werve
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-09 00:00:00 Z
13
+ date: 2012-04-23 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -115,17 +115,17 @@ files:
115
115
  - Rakefile
116
116
  - Gemfile
117
117
  - mizuno.gemspec
118
+ - bin/mizuno
119
+ - lib/mizuno.rb
118
120
  - lib/mizuno/choices.rb
119
121
  - lib/mizuno/http_server.rb
120
122
  - lib/mizuno/java_logger.rb
121
- - lib/mizuno/rack/chunked.rb
122
123
  - lib/mizuno/rack_servlet.rb
123
124
  - lib/mizuno/reloader.rb
124
125
  - lib/mizuno/runner.rb
125
126
  - lib/mizuno/version.rb
126
- - lib/mizuno.rb
127
+ - lib/mizuno/rack/chunked.rb
127
128
  - lib/rack/handler/mizuno.rb
128
- - bin/mizuno
129
129
  - lib/java/jetty-continuation-8.1.2.v20120308.jar
130
130
  - lib/java/jetty-http-8.1.2.v20120308.jar
131
131
  - lib/java/jetty-io-8.1.2.v20120308.jar