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
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