Skip to content

Conversation

@bomgar
Copy link
Contributor

@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
Copy link
Contributor Author

bomgar commented May 14, 2025

@fatroom I signed the commit

@fatroom
Copy link
Member

fatroom commented Jun 3, 2025

👍

1 similar comment
@alexliahushau
Copy link
Contributor

👍

@fatroom fatroom merged commit 99f64c3 into zalando:main Jun 10, 2025
4 checks passed
@fatroom fatroom added this to the 4.4.0 milestone Jun 10, 2025
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.

3 participants