# Ruby http proxy

**URL:** <https://www.ruby-forum.com/t/ruby-http-proxy/74969>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/ruby-http-proxy/74969 "2006-11-07T11:04:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/ruby-http-proxy/74969/1 "2006-11-07T11:04:30Z")

</div>

This isn’t really a ruby specific question, but it is written partly  
in ruby. After putting together an http reverse proxy using Zed’s C  
based parsers and eventmachine, I’m asking myself if I’m not doing  
more work than I need. I’m parsing the request from the client and  
the response from the server, including chunked encodings. But do I  
really need to parse the server response? Seems to me I could just  
keep the connection to the server open until the server closes the  
connection or the client does. What reasons would there be to have  
the overhead in a proxy of parsing things like the headers and chunked  
headers/bodies? Not parsing the server response means I can’t replace  
headers like the server header, and according to the http spec I’m  
supposed to keep a separate state for the client and server for  
certain things like the Connection header. What else am I missing?

Chris
