Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEAD responds with a body #24

Closed
ghazel opened this issue Jun 25, 2011 · 1 comment
Closed

HEAD responds with a body #24

ghazel opened this issue Jun 25, 2011 · 1 comment

Comments

@ghazel
Copy link

ghazel commented Jun 25, 2011

Seems like async_sinatra responds with a body when a HEAD request is made, where regular Sinatra works fine.

require 'sinatra/async'

class TestServer < Sinatra::Base
  register Sinatra::Async
  aget '/' do
    body('hello')
  end
end

TestServer.run!
>ruby -e "require 'socket'; s=TCPSocket.open('localhost',4567); s.write(\"HEAD / HTTP/1.0\r\n\r\n\"); while((d=s.recv(1)).length>0) do print(d); end"
HTTP/1.1 200 OK
Content-Length: 5
Connection: close
Server: thin 1.2.11 codename Bat-Shit Crazy

hello
@raggi
Copy link
Owner

raggi commented Feb 20, 2012

Fixed in master, thank you.

@raggi raggi closed this as completed Feb 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants