geekq/jetty-rackup — pull request #4 by erdeszt (2012-12-19 11:15:31+00:00)
Title: Updating the jruby-rack jar to 1.1.12

Hi!

I had some problems using jetty-rackup. Here's my poc:

```ruby
require 'sinatra/base'

class Test < Sinatra::Base
get '/' do
halt 400, 'test'
end

get '/test' do
'test'
end
end

run Test
```
**My ruby version:**

jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [linux-amd64]

**My gem list:**

bouncy-castle-java (1.5.0146.1)
bundler (1.2.3)
daemons (1.1.9)
eventmachine (1.0.0 java)
jetty-rackup (7.0.0)
jruby-openssl (0.8.2)
rack (1.4.1)
rack-protection (1.3.2)
rake (10.0.3)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
sinatra (1.3.3)
tilt (1.3.3)

**The issue is this:**

Trying 192.168.1.125...
Connected to 192.168.1.125.
Escape character is '^]'.
GET / HTTP/1.1
Host: 192.168.1.125

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html;charset=UTF-8
Content-Length: 4
Server: Jetty(7.2.2.v20101205)

Connection closed by foreign host.

So the Content-Length header is correct but the connection is closed before the actual content is sent. That causes a HTTP 354 in Chrome (and no result in Firefox).
Sinatra returns the correct triplet, something like this: [400, { 'Content-Length': 4 }, 'test']
After I upgraded the jruby-rack jar to version 1.1.12 I get the correct result.

Regards,

erdeszt