Open schmitch opened 9 years ago
Hi there, I am having the same problem here. Any updates about a possible fix? @schmitch , did you find a way of fixing the annotation client or just switched to template based client?
EDIT: I noted that the bug only occurs when using multiple instances of the proxy (i.e.: calling Ribbon.from() for every request). On the other hand, if creating the proxy instance once, the problems ceases to exist (didn't find any documentation about that though)
Another way of fixing it is to replace com.netflix.ribbon.Ribbon
for a custom MyRibbon
class, that creates a new DefaultResourceFactory() foreach from() call, and creating foreach new resourcefactory a new MyAnnotationProcessorsProvider (which could be a copy of DefaultAnnotationProcessorsProvider). That way, multiple instances of the same client could be created without this problem.
This is useful for also using this MyRibbon class to provide the possibility of creating proxy instances for custom namespaces.
I have the same issue and for some reason creating a proxy instance just once didn't fixed the issue for me. Wondering if using Feign will also solve the issue or it's an issue with Ribbon itself.
Hello, currently I use ribbon for some http request, we use the Annotation Proxy method and defined two headers:
Currently after each requests the headers getting added to the request
First request:
Second request:
As you can see, my headers getting doubled, then trippled, then i have four, five, etc.. It looks like the headers getting added and added every request.
My server will add custom headers together so I can't validate the request after the second one, even if I do some parsing I will end up failing badly after some requests (max header size)
Edit: I use ribbon in a playframework client, a Karyon2 RxNetty based Server and a RxNetty based JerseyBlocking Server.
Edit2: Only happens while using the Annotation based client!