# Sending response headers with eRuby

**URL:** <https://www.ruby-forum.com/t/sending-response-headers-with-eruby/123551>\
**Category:** Ruby\
**Created:** [December 18, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/sending-response-headers-with-eruby/123551 "2007-12-18T18:18:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/96bed5/32.png) [@alexd](https://www.ruby-forum.com/u/alexd)\
**Post date:** [December 18, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/sending-response-headers-with-eruby/123551/1 "2007-12-18T18:18:54Z")

</div>

I have a little Ruby program that runs over HTTP via eRuby. I need to  
be able to send custom HTTP status codes (and other headers) but it  
seems that they’re all set and flushed by the time my rhtml file is  
processed.

I see this is possible by running a straight Ruby script with the CGI  
library, but I’m not able to call scripts in /usr/bin (where Ruby is  
stored) over the web on my shared host.

Is there any way to send headers with eRuby?

Thanks in advance,

Alex
