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
Added new client_ip accessor #2114
Conversation
…se client_ip instead of client to be more representative of what will be returned (actual ipv6 ip instead of bracket wrapped ip)
This will close #1901 when merged |
Codecov Report
@@ Coverage Diff @@
## main #2114 +/- ##
=============================================
+ Coverage 92.133% 92.151% +0.018%
=============================================
Files 38 38
Lines 3470 3478 +8
Branches 572 575 +3
=============================================
+ Hits 3197 3205 +8
Misses 185 185
Partials 88 88
Continue to review full report at Codecov.
|
Nice. Some tests when you have a chance? 😎 |
@ahopkins that's why it's still a draft, need to make sure test_client will do what I want. |
😆 totally didn't see that. sorry. I was on my phone. Might need to mock it. IIRC, I had some problems in the past. But, that might have been ASGI client. |
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.
LGTM. Leaving discussion of other necessary work on bracket handling and client IPs elsewhere (I don't believe that socket level client IP is very useful; usually you want true remote IP instead).
Test client doesn't support ipv6, looks like. Going to have to come at the tests from a different direction... probably mocking like @ahopkins suggested. |
I'll spend some time looking at the test client tonight. It should be able to. |
Added new client_ip accessor for ConnInfo class, updated request to use client_ip instead of client to be more representative of what will be returned (actual ipv6 ip instead of bracket wrapped ip)