fishwife 1.4.0-java → 1.4.1-java

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/History.rdoc CHANGED
@@ -1,3 +1,17 @@
1
+ === 1.4.1 (2013-5-7)
2
+ * Override Rack::Server to disable the default inclusion of
3
+ Rack::Chunked middleware with "development" or "deployment"
4
+ environments. Otherwise Jetty may treat the chunked transfer-encoded
5
+ body as literal. The Rack::Server is used for example, when started
6
+ via `fishwife` or `rackup`. Note: Sinatra 1.4.x now honors these
7
+ middleware, exposing this problem as fishwife #5.
8
+
9
+ Also note that Rack::ContentLength is included by default with these
10
+ same environments, but is not included in other environments or
11
+ startup paths. Sinatra ensures the Content-Length itself. If not
12
+ using Sinatra or comparable, including `use Rack::ContentLength` is
13
+ advisable.
14
+
1
15
  === 1.4.0 (2012-12-13)
2
16
  * Upgrade/broaden to rjack-jetty [7.6.7,9.1). This includes 9.0.0.0
3
17
  based on upstream M3, a milestone pre-release.
data/Manifest.txt CHANGED
@@ -17,4 +17,4 @@ spec/spec_helper.rb
17
17
  spec/test_app.rb
18
18
  spec/data/hello.txt
19
19
  spec/data/reddit-icon.png
20
- lib/fishwife/fishwife-1.4.0.jar
20
+ lib/fishwife/fishwife-1.4.1.jar
data/example/config.ru CHANGED
@@ -1,5 +1,5 @@
1
- #\ -s Fishwife -p 9297 -O request_log_file=stderr -E none
2
- # The above is equivalent to 'rackup [options]'
1
+ # -*- ruby -*-
2
+ #\ -s Fishwife -p 9297
3
3
 
4
4
  # We don't assume SLF4J log output handler when launching via
5
5
  # 'rackup', so you should do something like this here.
@@ -7,6 +7,4 @@
7
7
  require 'rjack-logback'
8
8
  RJack::Logback.config_console( :stderr => true, :thread => true )
9
9
 
10
- use Rack::ContentLength
11
-
12
- run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["Hello"]] }
10
+ run proc { [ 200, {"Content-Type" => "text/plain"}, ["Hello", " world!\n"] ] }
data/example/giant.ru CHANGED
@@ -1,5 +1,5 @@
1
- #\ -s Fishwife -p 9297 -E production
2
1
  # -*- ruby -*-
2
+ #\ -s Fishwife -p 9297 -E production
3
3
 
4
4
  require 'rjack-logback'
5
5
  RJack::Logback.config_console( :stderr => true, :thread => true )
data/lib/fishwife/base.rb CHANGED
@@ -15,6 +15,6 @@
15
15
  #++
16
16
 
17
17
  module Fishwife
18
- VERSION = '1.4.0'
18
+ VERSION = '1.4.1'
19
19
  LIB_DIR = File.dirname( __FILE__ )
20
20
  end
@@ -15,8 +15,33 @@
15
15
  #++
16
16
 
17
17
  require 'fishwife'
18
+ require 'rack/server'
19
+ require 'rack/chunked'
18
20
 
19
21
  module Rack
22
+
23
+ class Server
24
+ alias orig_middleware middleware
25
+
26
+ # Override to remove Rack::Chunked middleware from defaults of any
27
+ # environment. Rack::Chunked doesn't play nice with Jetty which
28
+ # does its own chunking. Unfortunately rack doesn't have a better
29
+ # way to indicate this incompatibility.
30
+ def middleware
31
+ mw = Hash.new { |h,k| h[k] = [] }
32
+ orig_middleware.each do |env, wares|
33
+ mw[ env ] = cream( wares )
34
+ end
35
+ mw
36
+ end
37
+
38
+ def cream( wares )
39
+ wares.reject do |w|
40
+ w == Rack::Chunked || ( w.is_a?( Array ) && w.first == Rack::Chunked )
41
+ end
42
+ end
43
+ end
44
+
20
45
  module Handler
21
46
  # Rack expects Rack::Handler::Fishwife via require 'rack/handler/fishwife'
22
47
  class Fishwife
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
  <groupId>fishwife</groupId>
5
5
  <artifactId>fishwife</artifactId>
6
6
  <packaging>jar</packaging>
7
- <version>1.4.0</version>
7
+ <version>1.4.1</version>
8
8
  <name>Fishwife Java Extension</name>
9
9
 
10
10
  <properties>
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: fishwife
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.4.0
5
+ version: 1.4.1
6
6
  platform: java
7
7
  authors:
8
8
  - David Kellum
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-14 00:00:00.000000000 Z
12
+ date: 2013-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -164,7 +164,7 @@ files:
164
164
  - spec/test_app.rb
165
165
  - spec/data/hello.txt
166
166
  - spec/data/reddit-icon.png
167
- - lib/fishwife/fishwife-1.4.0.jar
167
+ - lib/fishwife/fishwife-1.4.1.jar
168
168
  homepage: http://github.com/dekellum/fishwife
169
169
  licenses: []
170
170
  post_install_message: