python - How can i send a flask response in from forked child and not from original handler -
i'm using flask gunicorn.
i want stream of response constructed , returned different process, did fork gunicorn , return it. child process commits suicide , parent finish processing returning own response ("", 200). but, "curl localhost/preview -d'{}'" exits error: "problem (2) in chunked-encoded data".
as understand it, because parent writes it's own response stream of http1.1 has been written child , break "chunked transfer encoding".
can give me advice how can handle this?
the simplified code use: https://gist.github.com/worroc/a5a97329cbda4b60941b44939c907868
thanks lot
Comments
Post a Comment