diff options
author | Felix Geisendörfer <felix@debuggable.com> | 2011-12-18 15:55:40 +0100 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-19 19:00:16 -0700 |
commit | 18240193ba421695d984c3d73e88de7e1b324e0a (patch) | |
tree | 9272cc0d8b51c5ff63f04b855975e1733f29ff5e /test/simple/test-http-client-parse-error.js | |
parent | 891f9defeb9713d8da9428195ad594a6d3627400 (diff) | |
download | node-new-18240193ba421695d984c3d73e88de7e1b324e0a.tar.gz |
Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
Diffstat (limited to 'test/simple/test-http-client-parse-error.js')
-rw-r--r-- | test/simple/test-http-client-parse-error.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/simple/test-http-client-parse-error.js b/test/simple/test-http-client-parse-error.js index 1ca7d58f78..91baa4706e 100644 --- a/test/simple/test-http-client-parse-error.js +++ b/test/simple/test-http-client-parse-error.js @@ -48,6 +48,7 @@ srv.listen(common.PORT, '127.0.0.1', function() { console.log('got error from client'); srv.close(); assert.ok(e.message.indexOf('Parse Error') >= 0); + assert.equal(e.code, 'HPE_INVALID_CONSTANT'); parseError = true; }); }); |