was crashing under puma, needed to ensure we always get an ip even if we are being served over a unix sock where remote_addr is empty
was crashing under puma
Can you add tests for it, just making sure remote_addrs is empty and client ip address is used, etc?
@SamSaffron ping! Could you add the tests that Carlos mentioned? Thanks.
@evanphx hey do you have any thoughts on this? When I add this patch, I get failures like this:
test_0002_remote ip(RequestTest) [/Users/steve/src/rails/actionpack/test/dispatch/request_test.rb:51]:
test_0004_remote ip v6(RequestTest) [/Users/steve/src/rails/actionpack/test/dispatch/request_test.rb:146]:
test_0007_remote ip v6 with user specified trusted proxies String(RequestTest) [/Users/steve/src/rails/actionpack/test/dispatch/request_test.rb:235]:
@@ -1 +1 @@
test_0008_remote ip with user specified trusted proxies Regexp(RequestTest) [/Users/steve/src/rails/actionpack/test/dispatch/request_test.rb:246]:
test_0009_remote ip v6 with user specified trusted proxies Regexp(RequestTest) [/Users/steve/src/rails/actionpack/test/dispatch/request_test.rb:257]:
@@ -1 +1 @@
They seem to imply that we do expect nil in certain cases. Should puma be assuming that we always get something back?
Sorry guys, I am fine to close this PR, since this happened I moved of puma and started using thin, sockets are not really an option for me cause I am using an off box load balancer that needs to pipe websockets back to the app.
I think the bug is not going to impact anyone in production and only a very small handful of devs.
Okay then. Thanks!