Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix error when logging incomplete requests #3990

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

erikjohnston
Copy link
Member

If a connection is lost before a request is read from Request, Twisted
sets method (and uri) attributes to dummy values. These dummy values
have incorrect types (i.e. they're not bytes), and so things like
__repr__ would raise an exception.

To fix this we had a helper method to return the method with a
consistent type.

@erikjohnston erikjohnston requested a review from a team October 2, 2018 11:01
If a connection is lost before a request is read from Request, Twisted
sets `method` (and `uri`) attributes to dummy values. These dummy values
have incorrect types (i.e. they're not bytes), and so things like
`__repr__` would raise an exception.

To fix this we had a helper method to return the method with a
consistent type.
@erikjohnston erikjohnston force-pushed the erikj/fix_logging_lost_connection branch from 1902107 to eeb755d Compare October 2, 2018 11:06
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

looks sane to me.

@erikjohnston erikjohnston merged commit 0f7033f into develop Oct 2, 2018
@erikjohnston erikjohnston deleted the erikj/fix_logging_lost_connection branch December 12, 2018 15:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants