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

Quote the multipart boundary header parameter value #39628

Merged
merged 1 commit into from
May 26, 2023

Conversation

chamil321
Copy link
Contributor

@chamil321 chamil321 commented Feb 16, 2023

Purpose

When setting boundary in the response along with the content type header, the quotes are missing and returns error

HTTP/1.1 200 OK
content-type: multipart/mixed;boundary=------=_Part_0_814051860.1675096572056
content-length: 145
server: ballerina
date: Thu, 16 Feb 2023 11:25:35 +0530  
[2023-02-16 11:25:35,985] TRACE {http.tracelog.upstream} - [id: 0xbbab8c31, correlatedSource: 0x023ca025, host:/127.0.0.1:54241 - remote:localhost/127.0.0.1:9090] INBOUND: DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 145, cap: 145/145, unwrapped: PooledUnsafeDirectByteBuf(ridx: 322, widx: 322, cap: 2048)), decoderResult: success), 145B
--------=_Part_0_814051860.1675096572056
content-type: application/json

{"bodyPart":"jsonPart"}
--------=_Part_0_814051860.1675096572056--
  
[2023-02-16 11:25:35,987] TRACE {http.tracelog.upstream} - [id: 0xbbab8c31, correlatedSource: 0x023ca025, host:/127.0.0.1:54241 - remote:localhost/127.0.0.1:9090] READ COMPLETE  
error: {ballerina/mime}ParsingEntityBodyFailed message=Error occurred while decoding body parts from inputstream More characters encountered in input than expected.
        at ballerina.http:externGetResEntity(http_response.bal:475)
           ballerina.http.Response:getEntity(http_response.bal:61)
           ballerina.http.Response:getBodyParts(http_response.bal:294)
           $value$test2__service_1:passthrough(main.bal:118)

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Mar 3, 2023
@chamil321 chamil321 removed the Stale label Mar 7, 2023
@github-actions
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Mar 22, 2023
@github-actions
Copy link

Closed PR due to inactivity for more than 18 days.

@github-actions github-actions bot closed this Mar 26, 2023
@anupama-pathirage
Copy link
Contributor

@shafreenAnfar Is this a PR that we can ignore as not needed?

@TharmiganK TharmiganK merged commit cfa9248 into ballerina-1.2.x May 26, 2023
5 checks passed
@TharmiganK TharmiganK deleted the mime-boundary branch May 26, 2023 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants