These are chat archives for spring-cloud/spring-cloud

22nd
Sep 2015
gorelikov
@gorelikov
Sep 22 2015 10:46
Hi! Could anyone explain me why RibbonRoutingFilter drops Content-Length header from request object? Is there any option to disable this transformation?
I talk about Zuul filter.
Dave Syer
@dsyer
Sep 22 2015 10:48
I think it causes problems with certain kinds of request (chunked encoding maybe). It doesn't completely drop it, just replaces it with one computed by the client, IIRC.
i.e. you should see a content length in downstream services
gorelikov
@gorelikov
Sep 22 2015 10:55
my problem that request like "curl -X POST -d'{"dsdsd":12}' -H 'Content-Length: 2' -i localhost:8765/dev/api/providers/test" passing through Zuul filter converts to something like:
content-type : application/x-www-form-urlencoded
accept-encoding : gzip
user-agent : curl/7.43.0
accept : /
netflix.nfhttpclient.version : 1.0
x-netflix-httpclientname :providers
transfer-encoding : chunked
connection : Keep-Alive
Dave Syer
@dsyer
Sep 22 2015 11:29
That looks valid on the downstream side (and invalid upstream because the content-length is wrong)
I would rather have a correct header than a wrong one
What are you expecting?
gorelikov
@gorelikov
Sep 22 2015 11:38
I expect that request will not has transfer-encoding : chunked header. I have problem with request processing in python microservice since uwsgi does not support chunked request
I want to control this this behaviour by myself since i want to use different clients in my infrasturcture
Dave Syer
@dsyer
Sep 22 2015 12:34
Then you need to get control of the client
You can do that to some extent with Ribbon
It's not completely open though IIRC
I doubt if there is literally nothing in the python stack that supports chunked encoding though
This is standard HTTP
So if you control the back ends I would look to change those first