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

Check address family to fill wsgi env properly #718

Merged
merged 1 commit into from
Jan 5, 2016

Conversation

redixin
Copy link
Contributor

@redixin redixin commented Jan 4, 2016

No description provided.

@merrellb
Copy link

merrellb commented Jan 4, 2016

I must admit I don't have a good grasp of the underlying networking code. It seems to address the immediate issue with unpacking the sockname tuple. However in terms of equivalency to the old code.

  • This commit loses the split(':')[0] on the hostname as well as the fallback to _host from the sockname.
  • This commit no longer checks self.transport.get_extra_info('peername') before trying to unpack the values. Does the family check insure that this will succeed?

@redixin redixin force-pushed the wsgi_env_address_family branch 2 times, most recently from 131da95 to 6e48b17 Compare January 4, 2016 21:49
@redixin
Copy link
Contributor Author

redixin commented Jan 4, 2016

@merrellb oh, I forgot it, thanks

@merrellb
Copy link

merrellb commented Jan 4, 2016

Cool. So we prefer to get SERVER_NAME and SERVER_PORT from the message rather than self.transport.get_extra_info('sockname')?

@asvetlov
Copy link
Member

asvetlov commented Jan 5, 2016

@merrellb yes, request's HOST header is the preferable source for host info.

@redixin looks good. Please fix flake8 errors.

@redixin
Copy link
Contributor Author

redixin commented Jan 5, 2016

@asvetlov done. Also added skipTest if no AF_UNIX (appveyor)

asvetlov added a commit that referenced this pull request Jan 5, 2016
Check address family to fill wsgi env properly
@asvetlov asvetlov merged commit 0c5ffb6 into aio-libs:master Jan 5, 2016
@asvetlov
Copy link
Member

asvetlov commented Jan 5, 2016

thanks

@asvetlov asvetlov added this to the 0.21 milestone Jan 5, 2016
@asvetlov asvetlov added the bug label Jan 5, 2016
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants