Comments (8)
Also, I'm curious as to how the HTTP message looks like. Seems obvious we have a bug, because we assume it can be converted to a string, but I wonder what the content-type
is set to, for this binary part.
https://www.rfc-editor.org/rfc/rfc7578.html#section-4.4 says the default content-type if missing is text/plain
. So that's relevant.
from quarkus.
https://www.rfc-editor.org/rfc/rfc7578.html#section-4.4 says the default content-type if missing is text/plain. So that's relevant.
So it seems like we are not taking into account the fact that the content is not text and automatically assuming it is.
We should fix this, but then that will also require (based on our current state of things), that we assign some kind of fileName to it.
from quarkus.
#38714 should take care of it
from quarkus.
/cc @FroMage (resteasy-reactive), @geoand (resteasy-reactive), @stuartwdouglas (resteasy-reactive)
from quarkus.
Thanks for the detailed report!
Could you please attach a sample application that behaves as you describe?
It will be really helpful in debugging the issue and adding a proper test when it comes time to fix it.
Thanks!
from quarkus.
I've smacked together a quick reproducer here: multipart-reproducer.zip
I've tried explicitly passing content-types, but the difference it makes from what I can tell is allowing the client to specify the charset to encode the String with. I.e. specifying ISO-8859-1 as the charset using
curl -v -H 'Content-Type: multipart/form-data' -F 'example=<./example.jpg;charset=ISO8859-1' http://localhost:8080/test
won't change anything, but
curl -v -H 'Content-Type: multipart/form-data' -F 'example=<./example.jpg;type="application/octet-stream";charset=ISO8859-1 http://localhost:8080/test
will. Providing ISO-8859-1 as opposed to the UTF-8 default would make the resulting server-side array length smaller, though still wrong.
from quarkus.
Wouldn't changing the type of FormValue:getType from String to byte[] suffice in order to handle all possible content types? I suppose one would still probably prefer some sort of file handling so as to handle large parts though
from quarkus.
I am working on a fix now
from quarkus.
Related Issues (20)
- Customizing the JSON logging formatter HOT 1
- Log records show the hostname on which the native executable was generated HOT 2
- Allow adding labels to routes HOT 3
- Make sure Quarkus is referenced with recent examples in the htmx ecosystem HOT 3
- Documentation: Clarify possible self-invocation as CDI extension HOT 5
- Restore access to HttpSecurityPolicy retriever for current RoutingContext HOT 12
- Redis error: Pool initialized with SSL but connection requested plain socket HOT 9
- App fails to start when connection to OIDC server times out HOT 9
- Add documentation for Vertx and Qute integration HOT 1
- Can't use other dataformat of Jackson like xml for Jackson Rest Client HOT 4
- Missing OIDC enabled property for tenants HOT 2
- Quarkus REST abstract resources with @Path requires impl. to be CDI beans while RESTEasy does not HOT 5
- The LOCAL class has a scope annotation but it must be ignored per the CDI rules HOT 11
- PostgreSQL DevServices with embedding Vectors HOT 1
- REST Client reporting "false negative" unrecognized URL configuration keys on startup HOT 4
- no post-process filtering in native image tracing agent HOT 2
- Use conditional dependencies for Flyway HOT 5
- Problem with @ConfigProperty in null when using a process in Apache Camel Quarkus HOT 5
- GraphQL Query generated from windows doesn't work HOT 2
- Vaadin @Push does not work - always DISABLED HOT 2
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 quarkus.