No output when using Rack::Deflater #36

Open
GBH opened this Issue Oct 26, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

GBH commented Oct 26, 2011

It seems that thin doesn't serve content properly unless it was generated via halt

Normal request with compression off:

[12:13:56][oleg@Liger:~]$ curl -N -v http://localhost:3000
* About to connect() to localhost port 3000 (#0)
*   Trying ::1... Connection refused
*   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 400 Bad Request
< Content-Type: application/json
< Connection: keep-alive
< Vary: Accept-Encoding
< Server: thin 1.2.11 codename Bat-Shit Crazy
* no chunk, no close, no size. Assume close to signal end
< 
{"message":"Invalid URI"}* Closing connection #0

With compression enabled I see no response content:

[12:14:17][oleg@Liger:~]$ curl -N -v --compress http://localhost:3000
* About to connect() to localhost port 3000 (#0)
*   Trying ::1... Connection refused
*   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: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 400 Bad Request
< Content-Type: application/json
< Connection: keep-alive
< Vary: Accept-Encoding
< Content-Encoding: deflate
< Server: thin 1.2.11 codename Bat-Shit Crazy
* no chunk, no close, no size. Assume close to signal end
< 
* Closing connection #0

However if my app outputs content via halt it seems to work:

[12:14:56][oleg@Liger:~]$ curl -N -v --compress http://localhost:3000/v1/users
* About to connect() to localhost port 3000 (#0)
*   Trying ::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET /v1/users 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: */*
> Accept-Encoding: deflate, gzip
> 
< HTTP/1.1 400 Bad Request
< Content-Type: application/json
< Vary: Accept-Encoding
< Content-Encoding: deflate
< Connection: close
< Server: thin 1.2.11 codename Bat-Shit Crazy
< 
{"message":"No API key provided"}* Closing connection #0

Any idea what this might be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment