Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify proxy_request to work in streaming mode
As pointed out in #29, the previous implementation of proxy_request accumulated the proxy's response before it was sent back to the original client. This didn't only add latency to the system, but also the potential of making the process crash because too much memory could end up being used the NGAS, triggering the OOM killer to kill our process. In the case of POST requests this streaming functionality was not included because the underlying functions in the ngamsHttpUtils module didn't support this. In the case of a GET request this behavior wasn't implemented only to avoid writing some code and share it with the POST branch of the code. This commit finally changes the behavior of proxy_request to stream the response back to the original client rather than accumulating it in memory. Now that the missing functionality has been included into ngamsHttpUtils both GET and POST requests can be streamed, while their code is mostly shared. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
- Loading branch information