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.
- data/History.rdoc +21 -0
- data/Manifest.txt +1 -1
- data/README.rdoc +1 -1
- data/bin/fishwife +1 -1
- data/example/config.ru +3 -5
- data/example/giant.ru +1 -1
- data/lib/fishwife.rb +1 -1
- data/lib/fishwife/base.rb +2 -2
- data/lib/fishwife/{fishwife-1.5.0.jar → fishwife-1.5.1.jar} +0 -0
- data/lib/fishwife/http_server.rb +1 -1
- data/lib/fishwife/rack_servlet.rb +1 -1
- data/lib/rack/handler/fishwife.rb +37 -1
- data/pom.xml +1 -1
- data/spec/fishwife_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/test_app.rb +1 -1
- metadata +3 -3
data/History.rdoc
CHANGED
@@ -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.
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -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-
|
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
|
data/bin/fishwife
CHANGED
data/example/config.ru
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
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
|
-
|
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
data/lib/fishwife.rb
CHANGED
data/lib/fishwife/base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2011-
|
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.
|
18
|
+
VERSION = '1.5.1'
|
19
19
|
LIB_DIR = File.dirname( __FILE__ )
|
20
20
|
end
|
Binary file
|
data/lib/fishwife/http_server.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2011-
|
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
data/spec/fishwife_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/test_app.rb
CHANGED
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: fishwife
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.5.
|
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-
|
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.
|
161
|
+
- lib/fishwife/fishwife-1.5.1.jar
|
162
162
|
homepage: http://github.com/dekellum/fishwife
|
163
163
|
licenses: []
|
164
164
|
post_install_message:
|