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

removed messy header handling #435

Merged
merged 16 commits into from
Oct 17, 2018
Merged

Conversation

josephmancuso
Copy link
Member

This PR cleans up some code a bit and prevents the need to handle an arbitrary headers key in the container

@coveralls
Copy link

coveralls commented Oct 10, 2018

Coverage Status

Coverage decreased (-0.1%) to 91.452% when pulling 5186f22 on remove-headers-container into de8d7e2 on develop.

@vaibhavmule
Copy link
Contributor

That's a good clean up!

@@ -74,3 +75,6 @@ def _render(self):
}
).rendered_template
self._app.bind('Response', rendered_view)
request.header('Content-Type', str(len(rendered_view)))
self._app.bind('Headers', request.get_headers())
request.reset_headers()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to reset header and also why do we need request.get_headers, when you already set headers by request.header?


self.app.bind('Headers', Headers)
self.app.make('Request').header('Content-Length', str(len(rendered_view)))
Copy link
Contributor

Choose a reason for hiding this comment

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

if I'm not wrong this should be request.header?

@josephmancuso josephmancuso merged commit ebc5e50 into develop Oct 17, 2018
@josephmancuso josephmancuso deleted the remove-headers-container branch October 18, 2018 03:42
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.

3 participants