Comments (3)
Hello Eugene,
Thank you for the feedback and the issue.
I might be able to have a look during the week-end.
Whether you can't wait, do not hesitate to open a pull request.
from aleph.
@arnaudgeiser and @DerGuteMoritz are probably more familiar with this part of the code.
Looking at encode-request
, it seems we ignore :mime-type
if the part isn't a File, but that hardly seems fair. It seems like we should be able to manually add a Content-Type
header for those parts if supplied.
After looking at the Netty MemoryFileUpload class's behavior, there are a few more consequences to saying a part is a file than just getting a Content-Type header. It's possibly ok, but needs a closer look. We'd have to assign a file name, and it'll add Content-Disposition headers (as well as other headers) which the other end may treat differently from the existing behavior.
Continuing to use an Attribute and manually adding the Content-type header might be all we need, if we can do that. However, I was looking, and I don't see any way to add extra headers to Attribute parts in Netty, so MemoryFileUpload (or MixedFileUpload if we want to set an upper limit on how much memory to consume) may be our only options.
from aleph.
An issue is open regarding this on Netty (Eugene added a comment already) [1].
I also had a look and using MemoryFileUpload
might be the correct approach.
I spent a little bit of time on VertX (found nothing), Micronaut [2] and Reactor Netty [3].
[1] : netty/netty#6800
[2] : https://github.com/micronaut-projects/micronaut-core/blob/1d8a98ba11ec0d6d280812b9a433f2e23ba3dcca/http-client-core/src/main/java/io/micronaut/http/client/multipart/InputStreamPart.java
[3] : https://github.com/reactor/reactor-netty/blob/0296f6e03669c7337b7e9cd341461ee071d8e922/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientFormEncoder.java#L292
from aleph.
Related Issues (20)
- Clarification regarding aleph.http/start-server's :idle-timeout option HOT 5
- Improve wrap-future
- Netty resource leak detector too unreliable? HOT 20
- Missing aleph.utils.PluggableDnsAddressResolverGroup HOT 3
- TCP server: Spurious NPE on bogus TLS connection establishment HOT 1
- TCP server invokes handler when connection closes prematurely during TLS handshake HOT 13
- `aleph.udp-test/test-echo` broken on macs HOT 1
- Look into intermittently failing slow client test HOT 11
- Update examples and docs
- Add CONTRIBUTING.md HOT 2
- Increase TCP SSL Buffer HOT 9
- Accept shutdownGracefully parameters HOT 15
- Wrong number of args (5) passed to: manifold.executor/thread-factory HOT 3
- `test-failed-ssl-handshake` broken on Java 8 HOT 5
- Impossible to set custom file name when using memory data in a multipart upload
- "Possibly confusing dependencies found" regression in 0.6.1 HOT 5
- Add support for `wrap-decompression` middleware HOT 9
- Please bump netty versions because of CVE-2023-34462 HOT 1
- Enable endpoint identification (aka hostname verification) for TLS clients by default? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aleph.