mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
Use crc instead of buffer-crc32 for speed
This commit is contained in:
parent
7eb65eeca2
commit
f6ac068ab0
|
|
@ -1,6 +1,7 @@
|
|||
3.x
|
||||
===
|
||||
|
||||
* Use `crc` instead of `buffer-crc32` for speed
|
||||
* deps: connect@2.26.1
|
||||
- deps: body-parser@~1.8.2
|
||||
- deps: depd@0.4.5
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var crc = require('crc').crc32;
|
||||
var mime = require('connect').mime
|
||||
, proxyaddr = require('proxy-addr')
|
||||
, crc32 = require('buffer-crc32')
|
||||
, crypto = require('crypto');
|
||||
var typer = require('media-typer');
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ exports.wetag = function wetag(body, encoding){
|
|||
? body
|
||||
: new Buffer(body, encoding)
|
||||
var len = buf.length
|
||||
return 'W/"' + len.toString(16) + '-' + crc32.unsigned(buf) + '"'
|
||||
return 'W/"' + len.toString(16) + '-' + crc(buf) + '"'
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@
|
|||
"homepage": "http://expressjs.com/",
|
||||
"dependencies": {
|
||||
"basic-auth": "1.0.0",
|
||||
"buffer-crc32": "0.2.3",
|
||||
"connect": "2.26.1",
|
||||
"commander": "1.3.2",
|
||||
"cookie-signature": "1.0.5",
|
||||
"crc": "3.0.0",
|
||||
"debug": "~2.0.0",
|
||||
"depd": "0.4.5",
|
||||
"escape-html": "1.0.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user