Skip to content

fix: convert media type with charset #1746

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bomgar
Copy link

@bomgar bomgar commented May 14, 2025

charset caused issues with conversion

Description

Converting a MediaType with a charset throws an Exception

java.lang.IllegalArgumentException: MIME type may not contain reserved characters

	at org.apache.hc.core5.util.Args.check(Args.java:41)
	at org.apache.hc.core5.http.ContentType.create(ContentType.java:315)
	at org.apache.hc.core5.http.ContentType.create(ContentType.java:327)

Motivation and Context

We used text/xml;charset=UTF-8 as header and the client did not send the request.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@fatroom fatroom added the bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience. label May 14, 2025
@fatroom
Copy link
Member

fatroom commented May 14, 2025

@bomgar please make sure that your commits has verified signature. check the GH documentation on setting it up: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification

@bomgar
Copy link
Author

bomgar commented May 14, 2025

@fatroom I signed the commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants