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
Searched both open and closed issues for duplicates of this issue
Title adequately and concisely reflects the feature or the bug
Bug Report
When a request is closed by the client or aborted, restify doesn't change the default status code which is 200. This trickles through the audit log as well as the metrics plugin. Technically a response was never written, but if you are looking at aggregate metrics this can be quite misleading.
Restify Version
All
Node.js Version
All
Expected behaviour
I would expect an http 444 for req.on('close'). This seems applicable for req.on('abort') as well, but open to other status codes.
Bug Report
When a request is closed by the client or aborted, restify doesn't change the default status code which is 200. This trickles through the audit log as well as the metrics plugin. Technically a response was never written, but if you are looking at aggregate metrics this can be quite misleading.
Restify Version
All
Node.js Version
All
Expected behaviour
I would expect an http 444 for
req.on('close')
. This seems applicable forreq.on('abort')
as well, but open to other status codes.Actual behaviour
Restify leaves the default status code of 200.
Repro case
Start the process, then curl and ctrl-c the request. Wait for timeout to expire. See 200 in the audit logs.
Cause
These event listeners should probably set the status code as appropriate:
https://github.com/restify/node-restify/blob/master/lib/server.js#L1012
The text was updated successfully, but these errors were encountered: