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

GitHub issue #11: Nevow should handle interrupted HTTP responses. #42

Merged
merged 2 commits into from
Jul 5, 2014

Conversation

pmw
Copy link
Contributor

@pmw pmw commented Jun 25, 2014

There is nowhere in Nevow to attach an error handler for Request.finish() being called after a connection has been dropped, because the call is inside Nevow itself. A web application that uses redirection will get an error every time it does any asynchronous rendering, because the redirection happens before rendering finishes. This patch has Nevow catch and ignore the error.

@@ -130,6 +131,19 @@ def renderHTTP(self, ctx):
return self.renderResource(Res1(), 'bar').addCallback(
lambda result: self.assertEquals(result, 'world'))

def test_connectionLost(self):
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a docstring for this test?

@pmw
Copy link
Contributor Author

pmw commented Jun 26, 2014

Docstring has been added.

@exarkun exarkun mentioned this pull request Jul 4, 2014
@exarkun
Copy link
Member

exarkun commented Jul 4, 2014

I made some more coding standard-type changes: #44

@exarkun exarkun merged commit c33e20e into twisted:master Jul 5, 2014
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

Successfully merging this pull request may close these issues.

None yet

3 participants