Skip to content

Add support for retrieving remote address in HTTP listener #507

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

Merged
merged 2 commits into from
Aug 26, 2017

Conversation

orudge
Copy link
Contributor

@orudge orudge commented Jul 17, 2017

This PR fixes issues #235 and #445 by providing a mechanism to allow the client's IP address to be retrieved in the HTTP listener. I've also added in a basic unit test - more complex tests are tricky due to the unknown testing environment unfortunately.

Tested on Windows 7 and on Ubuntu.

@msftclas
Copy link

@orudge,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.

It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@msftclas
Copy link

@orudge, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, Microsoft Pull Request Bot

@orudge
Copy link
Contributor Author

orudge commented Jul 18, 2017

As a note, I've made a further revision which uses the RtlIpv6AddressToStringExW function (instead of InetNtopW), to ensure that the IPv6 scope ID is included. This changeset is based off a v2.9.1 branch but I can resubmit the pull request if you think this would be a better solution.

orudge@c472852

@ras0219-msft ras0219-msft merged commit 7964f1b into microsoft:master Aug 26, 2017
@ras0219-msft
Copy link
Contributor

Thanks for the PR and sorry for the delay!

It looks like RtlIpv6... is primarily for driver usage, so I'd prefer to keep using InetNtopW if it still functions acceptably for #235 and #445.

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