-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Conversation
That's a good clean up! |
…eFramework/core into remove-headers-container
@@ -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() |
There was a problem hiding this comment.
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))) |
There was a problem hiding this comment.
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
?
This PR cleans up some code a bit and prevents the need to handle an arbitrary headers key in the container