# Respond partial content

**URL:** <https://www.ruby-forum.com/t/respond-partial-content/191157>\
**Category:** Rails\
**Created:** [July 6, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/respond-partial-content/191157 "2010-07-06T17:56:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6bbea6/32.png) [@jarl](https://www.ruby-forum.com/u/jarl)\
**Post date:** [July 6, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/respond-partial-content/191157/1 "2010-07-06T17:56:29Z")

</div>

Hi.

This may seem like an absurd request. However it is becausy I  
integrate with a legacy system.

I am in the need to respond partial content (flush) before the action  
is fully complete. This should prevent the legacy system to timeout.

I need to send HTTP headers and some content (to indicate to the  
client that my rails app is actually alive), and the at the end of the  
action to complete and close the connection.

Something like this

def index  
respond\_headers  
do\_something\_that\_takes\_a\_long\_time #more than a minute  
render :text =\> ‘DONE’  
end

Does anybody know how to do this?

Jarl
