hjr3 / weldr

A HTTP 1.1 proxy written in Rust using tokio.
Apache License 2.0
218 stars 20 forks source link

Properly serialize request for backend #15

Closed hjr3 closed 7 years ago

hjr3 commented 7 years ago

In src/backend.rs the request is (mostly) hard coded. We should honor what the client is sending in.

One of the things I was thinking of was "Why are we parsing a request and then serializing that same request back"? One of the reasons we might want to do that is if we allow modification of the incoming request, such as adding or modifying header. Even in that case, we might decide modify the bytes.

yanns commented 7 years ago

I asked myself exactly the same questions, and came to the same tradeoffs... 😉

hjr3 commented 7 years ago

Fixed in https://github.com/hjr3/alacrity/pull/29