2 # Example application that echoes read data back to the HTTP client.
3 # This emulates the old echo protocol people used to run.
5 # An example of using this in a client would be to run:
6 # curl -NT- http://host:port/
8 # Then type random stuff in your terminal to watch it get echoed back!
16 while buf = @input.read(4096)
29 [ 200, { 'Content-Type' => 'application/octet-stream' },
30 EchoBody.new(env['rack.input']) ]