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

Add host property to Request #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lkraider
Copy link
Collaborator

An extra property to get only the url scheme e netloc parts from the request
url, useful when mapping to other urls within the same domain in the handlers.

@lkraider
Copy link
Collaborator Author

I don't think all handlers will use this property, so you'll be trading access cost for some handlers vs initialization cost for all handlers. It could be memoized, but I don't see much need to do so.

@sethmurphy
Copy link
Collaborator

I agree with Paul, we should be very careful adding anything that touches
every request. Ben's suggestion seems like the perfect compromise, adding a
function in the request module to parse the header as needed and leaving
the request class alone. There was a thread on this in the group a while
back:
https://groups.google.com/forum/?fromgroups=#!topic/brubeck-dev/QZNIBzFgKcs

On Mon, Apr 22, 2013 at 3:13 PM, Paul Eipper [email protected]:

I don't think all handlers will use this property, so you'll be trading
access cost for some handlers vs initialization cost for all handlers. It
could be memoized, but I don't see much need to do so.


Reply to this email directly or view it on GitHubhttps://github.com//pull/110#issuecomment-16815013
.

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