You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Enterprise (I think)
is this issue currently blocking your project? (yes/no): not exactly, a workaround exists
is this issue affecting a production system? (yes/no): not yet
Context
node version: 12.4.1
module version with issue: @commercial/hapi@19.0.5
last module version without issue: Unsure, but 18.x was OK
environment (e.g. node, browser, native): node
used with (e.g. hapi application, another framework, standalone, ...): hapi service
any other relevant information:
What are you trying to achieve or the steps to reproduce?
request.info.remoteAddress is not available after the socket is closed. It used to be available, because info data used to be constructed in full up till acab470, whereas now remoteAddress / remotePort are cached upon first access. If the first access is after the request aborted - the returned value is undefined (node docs say this bit is as designed).
It is trivial to work around this by e.g. calling request.info.toJSON() at the start of the request handler to make sure the IP is cached, but I wonder if this was intended and if so - should it be listed in release notes.
A quick search also found this: nodejs/node-v0.x-archive#9287, and I can see the IP address in the peername field, but it seems this has changed at some point between 0.x and 4.x...
What was the result you got?
request.info.remoteAddress is undefined.
What result did you expect?
request.info.remoteAddress should report the remote address (as recorded when the request came in?)
The text was updated successfully, but these errors were encountered:
hueniverse
added
bug
Bug or defect
feature
New functionality or improvement
$
Issue covered by a commercial support plan
and removed
support
Questions, discussions, and general support
labels
Feb 3, 2020
Support plan
Context
What are you trying to achieve or the steps to reproduce?
request.info.remoteAddress
is not available after the socket is closed. It used to be available, becauseinfo
data used to be constructed in full up till acab470, whereas nowremoteAddress
/remotePort
are cached upon first access. If the first access is after the request aborted - the returned value isundefined
(node docs say this bit is as designed).It is trivial to work around this by e.g. calling
request.info.toJSON()
at the start of the request handler to make sure the IP is cached, but I wonder if this was intended and if so - should it be listed in release notes.A quick search also found this: nodejs/node-v0.x-archive#9287, and I can see the IP address in the
peername
field, but it seems this has changed at some point between 0.x and 4.x...What was the result you got?
request.info.remoteAddress
isundefined
.What result did you expect?
request.info.remoteAddress
should report the remote address (as recorded when the request came in?)The text was updated successfully, but these errors were encountered: