From 6a1275dfec13960d182ada96752b30aac40e1e27 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 17 Apr 2017 14:49:31 +0200 Subject: [PATCH] src: add missing "http_parser.h" include In 9d522225e7907b6cf631975b34f586984f698e33 the indirect "http_parser.h" include was removed, which made `NODE_STRINGIFY()` fail silently for the http parser version in `process.versions`. PR-URL: https://github.com/nodejs/node/pull/12464 Fixes: https://github.com/nodejs/node/issues/12463 Ref: https://github.com/nodejs/node/pull/12366 Reviewed-By: Evan Lucas Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: Alexey Orlenko Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Brian White --- src/node.cc | 1 + test/parallel/test-process-versions.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/node.cc b/src/node.cc index 21296a1418..4913147619 100644 --- a/src/node.cc +++ b/src/node.cc @@ -54,6 +54,7 @@ #include "env.h" #include "env-inl.h" #include "handle_wrap.h" +#include "http_parser.h" #include "req-wrap.h" #include "req-wrap-inl.h" #include "string_bytes.h" diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js index 8532b259e0..e3fab6b527 100644 --- a/test/parallel/test-process-versions.js +++ b/test/parallel/test-process-versions.js @@ -20,3 +20,11 @@ expected_keys.sort(); const actual_keys = Object.keys(process.versions).sort(); assert.deepStrictEqual(actual_keys, expected_keys); + +assert(/^\d+\.\d+\.\d+(-.*)?$/.test(process.versions.ares)); +assert(/^\d+\.\d+\.\d+(-.*)?$/.test(process.versions.http_parser)); +assert(/^\d+\.\d+\.\d+(-.*)?$/.test(process.versions.node)); +assert(/^\d+\.\d+\.\d+(-.*)?$/.test(process.versions.uv)); +assert(/^\d+\.\d+\.\d+(-.*)?$/.test(process.versions.zlib)); +assert(/^\d+\.\d+\.\d+\.\d+$/.test(process.versions.v8)); +assert(/^\d+$/.test(process.versions.modules));