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

1.3: req.headers dictionary to contain bytes instead of str, and be optional at all #21

Open
pfalcon opened this issue Oct 31, 2017 · 2 comments

Comments

@pfalcon
Copy link
Owner

pfalcon commented Oct 31, 2017

Currently, for each request, headers are being parsed, decoded to str's and stored in req.headers dict. The idea is to skip decoding to str's to save on memory pressure. But a lot of request handlers don't care about headers, so add a mode when headers aren't stored, but skipped instead. There also can be a need for request handler to parse headers itself, so allow that too. Allow to set the default header parsing mode for the WebApp (the default default will be "skip headers"). Finally, factor out header parsing to a method, to allow subclasses to override it.

@pfalcon pfalcon changed the title req.headers dicstionary to contain bytes instead of str, and be optional at all req.headers dictionary to contain bytes instead of str, and be optional at all Oct 31, 2017
@pfalcon
Copy link
Owner Author

pfalcon commented Nov 12, 2017

Finally, factor out header parsing to a method, to allow subclasses to override it.

Done in d9840b6 , went into 1.2.3.

@pfalcon pfalcon changed the title req.headers dictionary to contain bytes instead of str, and be optional at all 1.3: req.headers dictionary to contain bytes instead of str, and be optional at all Dec 16, 2017
@pfalcon
Copy link
Owner Author

pfalcon commented Dec 16, 2017

The idea is to skip decoding to str's to save on memory pressure.

In 1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant