Hi all! I tackled with the multipart issue in a library I wrote that provides extensions to the HTTP client including multipart support (please see https://github.com/mizosoft/methanol). I was wondering if I could provide a patch for this issue in the light of MultipartBodyPublisher.java to be included in java.net.http. Flow control can be rewritten against the module using jdk.internal.net.http.common.SequentialScheduler. I haven’t found any of the available RequestPublishers impls that can be efficiently reused for such flow control. If that is possible, please consider if I could also provide other complementary patches such as:
this can make use of the already available jdk.internal.net.http.RequestPublishers.StringPublisher.
public interface MimeBodyPublisher extends BodyPublisher { String contentType(); } The HttpClient can use that to transparently add a Content-Type header for the request. In case of MultipartBodyPublisher, this ensures a Content-Type header with the correct boundary (which might be randomly generated) is used instead of being explicitly specified by the user. Similarly, this ensures the correct Content-Type is used in case of FormBodyPublisher. Please tell me which patches I can start working on. If any, this will be my first contribution so I believe I will need a sponsor. Thanks in advance! Moataz |
- 8235761: (httpclient) Investigate support for multipart... Moataz Abdelnasser
- Re: 8235761: (httpclient) Investigate support for ... Moataz Abdelnasser
- Re: 8235761: (httpclient) Investigate support ... Chris Hegarty