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

[FIX] Invalid runtime API usage when retrieving binary payload from a mime-datasource #467

Merged
merged 4 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "mime"
version = "2.5.0"
version = "2.5.1"
authors = ["Ballerina"]
keywords = ["mime", "multipart", "entity"]
repository = "https://github.com/ballerina-platform/module-ballerina-mime"
Expand All @@ -12,8 +12,8 @@ distribution = "2201.3.0"
[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "mime-native"
version = "2.5.0"
path = "../native/build/libs/mime-native-2.5.0.jar"
version = "2.5.1"
path = "../native/build/libs/mime-native-2.5.1-SNAPSHOT.jar"


[[platform.java11.dependency]]
Expand Down
4 changes: 2 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.5.0"
version = "2.5.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -101,7 +101,7 @@ modules = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.0.5"
version = "1.0.6"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This file contains all the notable changes done to the Ballerina MIME package th
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- [Binary payload retrieved from the `http:Request` has different content-length than the original payload](https://github.com/ballerina-platform/ballerina-standard-library/issues/3662)
ayeshLK marked this conversation as resolved.
Show resolved Hide resolved

## Fixed

ayeshLK marked this conversation as resolved.
Show resolved Hide resolved
## [2.5.0] - 2022-11-29

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ protected static Object getAlreadyBuiltByteArray(BObject entityObj, Object messa
String charsetValue = MimeUtil.getContentTypeParamValue(contentTypeValue, CHARSET);
if (isNotNullAndEmpty(charsetValue)) {
return ValueCreator.createArrayValue(
StringUtils.getJsonString(messageDataSource).getBytes(charsetValue));
StringUtils.getStringValue(messageDataSource, null).getBytes(charsetValue));
}
return ValueCreator.createArrayValue(
StringUtils.getJsonString(messageDataSource).getBytes(Charset.defaultCharset()));
StringUtils.getStringValue(messageDataSource, null).getBytes(Charset.defaultCharset()));
}
return ValueCreator.createArrayValue(new byte[0]);
}
Expand Down