fishwife 1.5.0-java → 1.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,30 @@
1
+ === 1.5.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
+
15
+ * Also make Rack::Chunked a no-op, given `rackup` load order or other
16
+ cases where used.
17
+
1
18
  === 1.5.0 (2013-3-9)
2
19
  * Upgrade to rack ~> 1.5.2
3
20
  * Upgrade to rjack-jetty ~> 9.0.0 (>= 9.0.0.5/v20130308 release)
4
21
  * Upgrade/narrow to rjack-slf4j ~> 1.7.2, -logback ~> 1.2 (dev)
5
22
  * Upgrade to json ~> 1.7.7, rspec ~> 2.13.0 (dev)
6
23
 
24
+ === 1.4.1 (2013-5-7)
25
+ * Disable Rack::Server default inclusion of Rack::Chunked (see full
26
+ description in 1.5.1)
27
+
7
28
  === 1.4.0 (2012-12-13)
8
29
  * Upgrade/broaden to rjack-jetty [7.6.7,9.1). This includes 9.0.0.0
9
30
  based on upstream M3, a milestone pre-release.
@@ -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.5.0.jar
20
+ lib/fishwife/fishwife-1.5.1.jar
@@ -69,7 +69,7 @@ will need to load an output provider (see linked docs.)
69
69
 
70
70
  == License
71
71
 
72
- Copyright (c) 2011-2012 David Kellum
72
+ Copyright (c) 2011-2013 David Kellum
73
73
 
74
74
  Licensed under the Apache License, Version 2.0 (the "License"); you
75
75
  may not use this file except in compliance with the License. You
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env jruby
2
2
  # -*- ruby -*-
3
3
  #--
4
- # Copyright (c) 2011-2012 David Kellum
4
+ # Copyright (c) 2011-2013 David Kellum
5
5
  # Copyright (c) 2010-2011 Don Werve
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License"); you
@@ -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"] ] }
@@ -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 )
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  # Copyright (c) 2010-2011 Don Werve
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -15,6 +15,6 @@
15
15
  #++
16
16
 
17
17
  module Fishwife
18
- VERSION = '1.5.0'
18
+ VERSION = '1.5.1'
19
19
  LIB_DIR = File.dirname( __FILE__ )
20
20
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  # Copyright (c) 2010-2011 Don Werve
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -15,8 +15,44 @@
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
+
45
+ # Use of `rackup` may still include Rack::Chunked given load order.
46
+ # Override chunk as No-Op.
47
+ class Chunked
48
+ def initialize( app )
49
+ @app = app
50
+ end
51
+ def call( env )
52
+ @app.call( env )
53
+ end
54
+ end
55
+
20
56
  module Handler
21
57
  # Rack expects Rack::Handler::Fishwife via require 'rack/handler/fishwife'
22
58
  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.5.0</version>
7
+ <version>1.5.1</version>
8
8
  <name>Fishwife Java Extension</name>
9
9
 
10
10
  <properties>
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  # Copyright (c) 2010-2011 Don Werve
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  # Copyright (c) 2010-2011 Don Werve
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2012 David Kellum
2
+ # Copyright (c) 2011-2013 David Kellum
3
3
  # Copyright (c) 2010-2011 Don Werve
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: fishwife
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.5.0
5
+ version: 1.5.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: 2013-03-09 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
@@ -158,7 +158,7 @@ files:
158
158
  - spec/test_app.rb
159
159
  - spec/data/hello.txt
160
160
  - spec/data/reddit-icon.png
161
- - lib/fishwife/fishwife-1.5.0.jar
161
+ - lib/fishwife/fishwife-1.5.1.jar
162
162
  homepage: http://github.com/dekellum/fishwife
163
163
  licenses: []
164
164
  post_install_message: