apache / apache/openwhisk

Transfer-Encoding: chunked causes error

Open
#3,381 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

Hi, I've built a Spring Boot Docker container: https://github.com/nheidloff/openwhisk-debug-java

When I use the out of the box Spring functionality to build REST endpoints "Transfer-Encoding: chunked" is returned as header. When the container is deployed to the IBM Cloud I get the following error when invoking it: “The action did not produce a valid response and exited unexpectedly.”

I couldn't find a good way to get Spring Boot not to return this header. Instead I used a workaround/hack where the length of the output is calculated and then set in the content length header which causes the transfer encoding header to disappear. https://github.com/nheidloff/openwhisk-debug-java/blob/master/spring/src/main/java/docker/Function.java#L42

Since someone else ran into the same issue https://github.com/jthomas/ow/issues/2, I'm wondering whether this can be changed on the OpenWhisk side?

Contributor guide

Open the contributing guide

Research direction

Start with the linked spring/src/main/java/docker/Function.java workaround and the two linked issue reports to understand the chunked-response failure. Then trace OpenWhisk's HTTP response handling and determine whether chunked responses should be accepted; done means the behavior is resolved or the supported response requirements are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, scala, spring-boot
Domain
api, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.