examples
examples copied to clipboard
http-proxy example 400 response
having some trouble with the http-proxy example. It seems ClientRequest.send_stream results in a 400 response for any request that actually has a request body. It never even seems to hit the thing being proxied to. Not sure if I'm missing something or if the example is broken.
Probably fixed by #186. Could you check?
Does #186 mean actix can't do stream proxying? This sounds like a dealbreaker for use cases where large request payloads are received (i.e. > 10MB).
I didn’t follow up on the details in #186 but my guess is that this limitation is only relevant to Actix’s web client. I use actix to stream large request bodies to Amazon S3 without reading them all into memory. You will, however, need to do some more boilerplate setup given the current limitations of send and sync on errors and such
Optimally, the proxy would either stream a request or not depending on whether the awc response detects the proxied upstream to send transfer-encoding: chunked or not. Might be a fun change for the proxy example and shouldn't be too hard either.
On Fri, Nov 22, 2019, 14:57 Rotem Yaari [email protected] wrote:
I didn’t follow up on the details in #186 https://github.com/actix/examples/pull/186 but my guess is that this limitation is only relevant to Actix’s web client. I use actix to stream large request bodies to Amazon S3 without reading them all into memory. You will, however, need to do some more boilerplate setup given the current limitations of send and sync on errors and such
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/actix/examples/issues/188?email_source=notifications&email_token=AAAANAFIX5KBX4AL2OQDNL3QU7QMZA5CNFSM4JKT5MZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE5WQDA#issuecomment-557541388, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAANAA73M5TD33GBJVW3WTQU7QMZANCNFSM4JKT5MZQ .
Any idea or any help on correct streaming?
EDIT: while testing, it seems actix-web
's streaming
method works well so I think the problem is just on awc