ruby http proxy

S

snacktime

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top