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

A multipart request does not work when it contains application/json parts. #276

Open
jongidal opened this issue Jan 18, 2025 · 3 comments
Open
Labels
bug Something isn't working status:waiting-for-release Implemented, waiting for next stable release

Comments

@jongidal
Copy link

My backend is Spring Boot.
An API accepts a multipart request containing JSON parts.

I set a request in Kreya like this:

Image

But the backend throws an exception:
org.springframework.util.InvalidMimeTypeException: Invalid mime type "text/plain; charset=utf-8, application/json": utf-8, application/json

I tested the same API with Insomnia, and there was no problem.

The key differences between Kreya and Insomnia are these:

  1. The mineType of a JSON part in a multipart request
    Insomnia: application/json
    Kreya: text/plain; charset=utf-8, application/json
  2. The boundary text of Kreya contains quotation marks like this:
    Image

{
"kreyaVersion": "1.16.0",
"releaseChannel": "stable",
"osDescription": "Ubuntu Core 22",
"osVersion": "Unix 6.11.0.9",
"osArch": "X64",
"processArch": "X64",
"runtimeIdentifier": "linux-x64",
"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15"
}

@jongidal jongidal added the bug Something isn't working label Jan 18, 2025
@CommonGuy CommonGuy added the status:doing We are working on this label Jan 22, 2025
@CommonGuy
Copy link
Contributor

CommonGuy commented Jan 22, 2025

Thank you for reporting this. It seems like you discovered a long-standing bug in Kreya regarding multipart requests. We are working on a fix

@jongidal
Copy link
Author

Thank you. I want to use Kreya with my team. Everything is great except this bug.

@CommonGuy
Copy link
Contributor

We released a fix for this on our beta channel. See here on how to switch to the beta version: https://kreya.app/docs/faq/#how-can-i-use-kreya-beta-versions

@CommonGuy CommonGuy added status:waiting-for-release Implemented, waiting for next stable release and removed status:doing We are working on this labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:waiting-for-release Implemented, waiting for next stable release
Projects
None yet
Development

No branches or pull requests

2 participants