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

Transfer-Encoding: chunked causes error #3381

Open
nheidloff opened this issue Mar 2, 2018 · 3 comments
Open

Transfer-Encoding: chunked causes error #3381

nheidloff opened this issue Mar 2, 2018 · 3 comments

Comments

@nheidloff
Copy link

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 jthomas/ow#2, I'm wondering whether this can be changed on the OpenWhisk side?

@markusthoemmes
Copy link
Contributor

Should be supportable. This could be a valuable first step for us to get into streaming!

We "just" need to make sure the HTTP client used in the invoker supports chunking and takes all the chunks before returning.

@rabbah
Copy link
Member

rabbah commented Mar 20, 2018

it's all just a matter of code 😅

@ddragosd
Copy link
Contributor

Just bumped into this issue as well (thanks @tysonnorris for pointing to it). I was debugging locally a blackbox Go action that was showing in the Invoker logs as NoResponseReceived(). When debugging locally OW I noticed that https://github.com/apache/incubator-openwhisk/blob/master/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ApacheBlockingContainerClient.scala#L112 doesn't handle chunked responses.

While we decide what to do about chunked responses from actions, a good intermediary step might be to document this aspect to developers, so they force non chunked responses ?

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

No branches or pull requests

4 participants