openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

fixed input stream in mode serializing #122

Closed mslaga closed 2 years ago

mslaga commented 2 years ago

ContentLength is optional in the HTTP header and cannot specify how much data will be copied to process. https://golang.org/src/net/http/request.go?s=12527:12599 // The value -1 indicates that the length is unknown.

Also, not all data will be available for io.LimitReader they could arrive later.

Description

Copy the req.InputReader stream to stdin in loop until EOF is reached.

Motivation and Context

Not works on slow machines like raspberry pi

How Has This Been Tested?

Not works at all on raspberry pi

Types of changes

Checklist:

derek[bot] commented 2 years ago

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

alexellis commented 2 years ago

Hi thanks for your interest, but you will need to raise an issue with a unit test or failing scenario that is reproducible before a pull request can be considered.

Do fill out the whole template and don't delete any of the fields.

You'll find out more on how to contribute in the Contributing guide in the faas repo.

Best,

Alex

derek[bot] commented 2 years ago

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.