Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Handle streaming requests. - #516

Open
jmcarp wants to merge 1 commit into
getsentry:masterfrom
jmcarp:master
Open

Handle streaming requests.#516
jmcarp wants to merge 1 commit into
getsentry:masterfrom
jmcarp:master

Conversation

@jmcarp

@jmcarp jmcarp commented Oct 29, 2014

Copy link
Copy Markdown

In Tornado RequestHandler classes decorated with the stream_request_body
decorator, the request body may be a Future instance rather than a
string, which breaks currently breaks JSON serialization. This patch
uses a modified JSON encoder for the Tornado module to handle this case
and adds a test to prevent regressions.

In Tornado RequestHandler classes decorated with the stream_request_body
decorator, the request body may be a Future instance rather than a
string, which breaks currently breaks JSON serialization. This patch
uses a modified JSON encoder for the Tornado module to handle this case
and adds a test to prevent regressions.
@xordoquy

Copy link
Copy Markdown
Contributor

I have no idea about how tornado works. Would be happy to have someone review this

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could do something slightly more explicit about Futures rather than just None.

if future.resolved():
    return yield from future
else:
    return future.__repr__()

Other than that :shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants