No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/actions
config
Gemfile
Gemfile.lock
Readme.md
application.rb
config.ru
rainbows.conf

Readme.md

An (almost) completely virgin Cramp project with Rainbows added to the Gemfile as well as a rainbows.conf file.

I'm seeing the action being called twice, with no response body sent to the client.

Seems to work fine under Thin.

##To reproduce:

  • bundle exec rainbows -c rainbows.conf
  • In another terminal: curl -vvvv http://localhost:8080

##Expectation Under Thin, I'd see:

$ thin -R config.ru start
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
127.0.0.1 - - [08/Sep/2011 13:48:33] "GET  HTTP/1.1" 200 - 0.0217

And the request works as expected:

$ curl -vvvv http://localhost:3000
* About to connect() to localhost port 3000 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:3000
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html
< Connection: keep-alive
< Server: thin 1.2.11 codename Bat-Shit Crazy
* no chunk, no close, no size. Assume close to signal end
< 
* Closing connection #0
Hello World!% 

However, with Rainbows (note the double logging of the request):

$ bundle exec rainbows -c rainbows.conf
I, [2011-09-08T13:44:04.397005 #16670]  INFO -- : listening on addr=0.0.0.0:8080 fd=5
I, [2011-09-08T13:44:04.397320 #16670]  INFO -- : worker=0 spawning...
I, [2011-09-08T13:44:04.398584 #16670]  INFO -- : master process ready
I, [2011-09-08T13:44:04.400252 #16672]  INFO -- : worker=0 spawned pid=16672
I, [2011-09-08T13:44:04.400752 #16672]  INFO -- : Refreshing Gem list
I, [2011-09-08T13:44:04.621984 #16672]  INFO -- : Rainbows! EventMachine worker_connections=1024
I, [2011-09-08T13:44:04.622253 #16672]  INFO -- : EventMachine: epoll=false kqueue=true
127.0.0.1 - - [08/Sep/2011 13:44:06] "GET  HTTP/1.1" 200 - 0.0206
127.0.0.1 - - [08/Sep/2011 13:44:06] "GET  HTTP/1.1" 200 - 0.0216

The request gives nothing in the body, and is sending it chunked:

$ curl -vvvv http://localhost:8080     
* About to connect() to localhost port 8080 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8080
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 08 Sep 2011 17:44:06 GMT
< Status: 200 OK
< Connection: keep-alive
< Content-Type: text/html
< Transfer-Encoding: chunked
< 
* Connection #0 to host localhost left intact
* Closing connection #0