Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Custom DefaultHttpDataFactory Bug #2259

Closed
galfordliu opened this issue Jun 1, 2022 · 2 comments · Fixed by #2265
Closed

Set Custom DefaultHttpDataFactory Bug #2259

galfordliu opened this issue Jun 1, 2022 · 2 comments · Fixed by #2265
Assignees
Labels
type/bug A general bug
Milestone

Comments

@galfordliu
Copy link

DefaultHttpDataFactorydefaultHttpDataFactory=new DefaultHttpDataFactory(DefaultHttpDataFactory.MINSIZE);

....

sendForm((req, form) ->{
                    String timestamp = String.valueOf(System.currentTimeMillis());
                    form.factory(defaultHttpDataFactory);   //change !!
                    form.attr("timestamp", timestamp);
                })

but HttpClientOperations. SendForm. DEFAULT_ FACTORY. Requestfiledeletemap will still grow. Invalid setting

Originally posted by @galfordliu in #2201 (comment)

@violetagg
Copy link
Member

@galfordliu Somehow I missed that comment in the other issue :(

And yeah there is an issue when one changes the factory, let me schedule this to be fixed in the next release.

@violetagg violetagg added type/bug A general bug and removed ❓need-triage labels Jun 1, 2022
@violetagg violetagg added this to the 1.0.20 milestone Jun 1, 2022
@violetagg violetagg self-assigned this Jun 2, 2022
violetagg added a commit that referenced this issue Jun 2, 2022
HttpClient#sendForm API uses BiConsumer and not BiFunction.
The user cannot change the encoder in the callback.
When a custom factory is provided, apply the changes when the control is again in Reactor Netty.

Fixes #2259
@violetagg
Copy link
Member

@galfordliu This should be fixed. If you can test it with 1.0.20-SNAPSHOT it will be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants